https://github.com/proton/coub_api
https://github.com/proton/coub_api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/proton/coub_api
- Owner: proton
- License: mit
- Created: 2015-09-05T11:02:31.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-05T11:02:43.000Z (almost 11 years ago)
- Last Synced: 2025-10-18T14:45:59.069Z (9 months ago)
- Language: Ruby
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this 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)