Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Bucket convienence class #74

Open
didactic-drunk opened this issue Apr 28, 2020 · 4 comments
Open

[RFC] Bucket convienence class #74

didactic-drunk opened this issue Apr 28, 2020 · 4 comments

Comments

@didactic-drunk
Copy link
Contributor

Taken directly from the ruby API:

client = Awscr::S3::Client.new ...
bucket = client.bucket("foo")

# enumerate every object in a bucket
bucket.objects.each do |obj|
  puts "#{obj.key} => #{obj.etag}"
end

# batch operations, delete objects in batches of 1k
bucket.objects(prefix: '/tmp-files/').delete

# single object operations
obj = bucket.object('hello')
@taylorfinnell
Copy link
Owner

I think it would be good.

However, on the other hand I think maybe instead of adding much more to this project we should start seeing if we can can generate AWS service shards from the AWS json definitions. As far as I know this is what java, go, ruby etc does in some fashion. They generate from these. In fact I think maybe the api you proposed comes from resources-1.json, but I am not 100% sure on that. At the very least we should probably consolidate with https://github.com/sdogruyol/aws by @sdogruyol in some fashion

All that said, PR for what you proposed is more than welcome

@didactic-drunk
Copy link
Contributor Author

Would it save time to fork aws-sdk-ruby, make minor modification to the templates and end up with an almost identical API and documentation as ruby?

@taylorfinnell
Copy link
Owner

The official SDKs seem to be slowly moving towards https://awslabs.github.io/smithy/, Crystal generation would be neat

@didactic-drunk
Copy link
Contributor Author

I see java, is there a ruby generator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants