CloudHealth / amazon-pricing

A Ruby library for retrieving pricing for Amazon Web Services
Other
65 stars 31 forks source link

Example code that works #73

Open treeder opened 9 years ago

treeder commented 9 years ago

Do you guys have any example code that works?

smhussain commented 8 years ago

Yes it would be great to have an example code that works.

gagan93jtg commented 7 years ago

I see the documentation isn't good either. I can't understand how to use this gem. Can anybody help ?

limitusus commented 7 years ago

@gagan93jtg I'm also a newbie to this gem and had just faced the same problem an hour ago. I read the spec and source code and found the design of classes are wholly changed. AwsPricing::PriceList is a base class and you should instantiate AwsPricing::Ec2PriceList and AwsPricing::RdsPriceList instead. Other interfaces looks very basic and rdoc seems up to date.

Example

AwsPricing::Ec2PriceList.new.get_region('us-east-1')