Last active
December 19, 2015 13:08
-
-
Save adamloving/5959477 to your computer and use it in GitHub Desktop.
I was trying to get a list of buckets (and eventually upload one file), but I couldn't get this to return more than one bucket until I specified the right region.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docs here: | |
# https://github.com/nodejitsu/pkgcloud/blob/master/docs/providers/rackspace/storage.md | |
pkgcloud = require('pkgcloud') | |
client = pkgcloud.storage.createClient | |
provider: 'rackspace' | |
username: process.env.RACKSPACE_USERNAME | |
apiKey: process.env.RACKSPACE_API_KEY | |
authUrl: 'https://auth.api.rackspacecloud.com' | |
region: 'ORD' | |
client.getContainers | |
limit: 10 | |
, | |
(err, containers) -> | |
console.log(err, 'containers...') | |
for container in containers | |
console.log container.name | |
client.getFiles container, (err, files) -> | |
console.log err, 'files...' | |
for file in files | |
console.log file.name | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment