Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.05 KB

README.md

File metadata and controls

55 lines (32 loc) · 1.05 KB

Pixnet API

This is a Ruby version library for Pixnet API, which use OAuth 1.0a.

You can go to PIXNET API developers / MURMUR API developers to look for more documents.

Install

Put this line in your Gemfile:

gem "pixnet_api"

Then bundle:

% bundle

OR if you want to install plugin, your project need some gems:

gem "oauth"
gem "json"
gem "multipart-post"

To install plugin, you can

$ rails plugin install [email protected]:wildjcrt/pixnet_api.git

General configuration options

First, Run the following generator command, then edit the generated file.

% rails g pixnet_api:install

Go to PIXNET API developers to register your app.

Finally, open config/initializers/oauth_pixnet.rb, and fill-up CONSUMER_KEY and ACCESS_TOKEN.

Usage

First, You need to create a variable for any method you want to call.

@pixnet_oauth = PixnetApi::PixnetOauth.new

Then you can call method like:

@pixnet_oauth.get_album_sets

OR

@pixnet_oauth.get_album_element your_element_id

Enjoy!