Skip to content

Ruby gem to interact with the official Pinterest REST API

License

Notifications You must be signed in to change notification settings

endil/pinterest-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pinterest

Code Climate Build Status

This is the Ruby gem for interacting with the official Pinterest REST API.

This gem uses Faraday and Hashie to make requests and parse the responses.

Usage

Obtain an access token from Pinterest. You can generate one here.

$ gem install pinterest

require 'pinterest-api'

client = Pinterest::Client.new(ACCESS_TOKEN)

# Get the authenticated user's Pinterest account info
client.me

# Get the pins that the authenticated user likes
client.get_likes

# Get the authenticated user's followers
client.get_followers

# Get the boards that the authenticated user follows
client.get_followed_boards

# Get the Pinterest users that the authenticated user follows
client.get_followed_users

# Get the interests that the authenticated user follows
client.get_followed_interests

# Follow a user
client.follow_user('shopseen')

# Unfollow a user
client.unfollow_user('shopseen')

# Follow a board
client.follow_board(<board_id>)

# Unfollow a board
client.unfollow_board(<board_id>)

# Follow an interest
client.follow_interest(<interest_id>)

# Unfollow an interest
client.unfollow_interest(<interest_id>)

# Search for authenticated users's pins related to shoes
client.get_pins(query: 'shoes')  

# Search for authenticated users's boards related to shoes
client.get_boards(query: 'shoes')

# Get the account info for a Pinterest user
client.get_user('<username>')

The gem is currently under active development. Use at your own risk. See Known Issues below.
I hope to have the gem ready for production shortly. See Contributing section below to help.

Known Issues

  • PATCH requests not working, endpoint path is not being appended to base

TODO

  • Pagination
  • OAuth
  • document Mash response methods

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/realadeel/pinterest-api.
Please provide a failing test for bug reports, and a passing test for pull requests.

About

Ruby gem to interact with the official Pinterest REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.4%
  • Shell 0.6%