mauricew / ruby-twitch-api Goto Github PK
View Code? Open in Web Editor NEWRuby client for the Twitch Helix API.
License: MIT License
Ruby client for the Twitch Helix API.
License: MIT License
Hello,
using client_id
client.get_streams works
but when i try get followers list i get
Twitch::ApiError: The server returned error 400
Using secret token i get error 401 in both (maybe i dont get the access token properly)
Thanks for help! ;)
There were many changes, including client headers and authentication, so let's make a new release (0.5.0, I guess).
I'm doing a bit of data wrangling and have a local method to convert a few model types into JSON objects; but I'm wondering if this might be helpful for others. Any interest in me putting up a PR to add some serialization? Or would you prefer to leave that up to the individual users?
Im kind of a newbie to rails, but I am trying to use omniauth-twitch with this gem, and long story short, oauth2 requires faraday > 0.13, and this gem requires faraday at 0.13. I don't know if there is an easy fix, just thought I would let you know :)
These will probably make it to release after next.
Hey there,
I think it would be really helpful to be able to change the Faraday adapter. Willing to make a PR but don't know exactly how you'd want it implemented. Care to discuss?
Hello,
I'm trying to create a user for my website based on an oauth login from Twitch. I've already retrieved my access token, saved to access_token. I'd like to be able to to save user data as profile_data. This is what I have:
client = Twitch::Client.new(:access_token => access_token)
user = client.get_users.data
puts user
profile_data = { :profile_image_url => user.profile_image_url, :display_name => user.display_name, :email => user.email, :id => user.id }
user is returning as an object, rather than a hash of data from Twitch. Can I still access the necessary data from this object? I'm new to web dev so apologies if this seems like a foolish question.
There is any reason for not support Ruby 3?
In v0.4.0 the Ruby 3 was supported, but in main branch is not.
Thank you for the work in this gem!
Travis CI is using deprecated method of integration with GitHub. I don't see its check on PRs: #8
I suggest Cirrus CI or GitHub Actions (I personally prefer the first one).
The "Client (application) flow" section of README.md
states:
Client (application) flow
This is default flow (
:token_type
).twitch_client = Twitch::Client.new( client_id: client_id, client_secret: client_secret, ## this is default # token_type: :application, ## this can be required by some Twitch end-points # scopes: scopes, ## if you already have one # access_token: access_token )
However, this code...
require "twitch-api"
CLIENT_ID = "hackme"
CLIENT_SECRET = "hackme"
twitch_client = Twitch::Client.new(
client_id: CLIENT_ID,
client_secret: CLIENT_SECRET
)
...returns:
/home/max/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/twitch-api-0.4.0/lib/twitch/client.rb:32:in `initialize': unknown keyword: :client_secret (ArgumentError)
from ./check:9:in `new'
from ./check:9:in `<main>'
Is there something I'm doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.