Project

coub_api

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for Coub API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

~> 0.8
>= 0
 Project Readme

CoubApi gem

Installation

gem install coub_api

Usage

api = CoubApi::Client.new
r = api.get(:search, q: 'test')
r = api.search(q: 'test')
r = api.search(q: 'test', api_version: 1)

oauth_url = CoubApi.authorization_url(client_id: CLIENT_ID, redirect_uri: URI)
oauth_url = CoubApi.authorization_url(client_id: CLIENT_ID, redirect_uri: URI, scope: %i[like repost])

api = CoubApi::Client.new(ACCESS_TOKEN, api_version: 2)
api = CoubApi::Client.new(ACCESS_TOKEN)

r = api.get('likes/by_channel', channel_id: 1164719)
r = api.get(:likes, :by_channel, channel_id: 1164719)
r = api.get(:likes, :by_channel, channel_id: 1164719, access_token: ANOTHER_ACCESS_TOKEN)