Code Monkey home page Code Monkey logo

plurky's Introduction

Plurky

Gem Version Build Status Dependency Status Code Climate Coverage Status Bitdeli Badge

Yet another Plurk API wrapper. Or something to play when the Plurk team is busy optimizing the site.

Installation

Add this line to your application's Gemfile:

gem 'plurky'

And then execute:

$ bundle

Or install it yourself as:

$ gem install plurky

Documentation

Examples

require 'plurky'

client = Plurky.client
client.get '/APP/Profile/getPublicProfile', :user_id => 34

Configuration

Applications that make requests on behalf of a single Plurk user can pass global configuration options as a block to the Plurky.configure method.

Plurky.configure do |config|
  config.consumer_key       = YOUR_CONSUMER_KEY
  config.consumer_secret    = YOUR_CONSUMER_SECRET
  config.oauth_token        = YOUR_OAUTH_TOKEN
  config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end

Alternately, you can set the following environment variables:

PLURK_CONSUMER_KEY
PLURK_CONSUMER_SECRET
PLURK_OAUTH_TOKEN
PLURK_OAUTH_TOKEN_SECRET

After configuration, requests can be made like so:

Plurky.get '/APP/Timeline/getPlurks'

Implemented APIs

  • status
  • update

Obtaining access tokens

Plurky will not support obtaining access tokens.

If you do not intend to provide service to other users, you can obtain an access token from the test console. (You may need to create a Plurk App first to get a pair of comsumer key and secret.)

TODO

  • Improve test coverage.
  • Add APIs.
  • Catch errors from Plurk.
  • APIs should return consistent data. (e.g. status & update.)

Credits

Most of the code are copy-pasted from the twitter gem.

Copyright

Copyright (c) 2012 - 2013 Chun-wei Kuo. See LICENSE for details.

plurky's People

Contributors

domon avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.