Giter VIP home page Giter VIP logo

twitch_api_v5's Introduction

Hello!

I'm a broadcast tools developer, with 10+ years of experience working on Twitch integrations, analytics, and safety, and 8+ years working on tools for live event production.

Bitfocus Companion

As well as work on Companion itself, I'm also a developer on a number of modules such as:

Twitch Dev Admin

You can find me helping to manage the TwitchDev Discord Server and moderate the TwitchDev Stream, where you can get support and examples for working with Twitch's 3rd party API and services.

Contact

My contact links are available on my site Dist.dev

twitch_api_v5's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

twitch_api_v5's Issues

Read-Only api#clientID

Hello @thedist,

i noticed an possible issue with the type definitions for TypeScript.

I did excactly the same usage of your module as you used it in your Readme:
grafik

Did I? Or is it like I expected a TypeScript Issue?

api.channels.channelByID returns undefined

Im getting channelID from api.streams.live and passing res.streams.channel._id to
api.channels.channelByID in result Im getting undefined.
When Im just use get request in browser like this for example https://api.twitch.tv/kraken/channels/190835892?client_id=XXXX
It Returns {"error":"Not Found","status":404,"message":"Unable to find channel for login \"190835892\""}
But when im insert channel login https://api.twitch.tv/kraken/channels/lirik?client_id=XXXX
Im finally receiving the channel info.
So I tried to pass login not channel id into api.channels.channelByID and I get error
GET https://api.twitch.tv/kraken/channels/welovegames?client_id=XXXX 400 ()
But this get request actually work in browser but not in Twitch_API_v5
So the problem is that I cant receive any data from api.channels.channelByID
This is my code:
Try to get by channelId:

this.props.api.streams.live({limit: limit}, (err, res) => {
                if (err) {
                    this.setState({streamsList: null})
                    this.setState({streamsListError: true})
                } else {
                    this.setState({streamsList: res.streams})
                    console.log(res.streams[0].channel._id)
                    let channelId = res.streams[0].channel._id
                    this.props.api.channels.channelByID({channelID: channelId}, (err, res) => {
                        if (err) {
                            console.log(err)
                        } else {
                            console.log(res.stream)
                        }
                    })
                }
})

By channel login:

this.props.api.streams.live({limit: limit}, (err, res) => {
                if (err) {
                    this.setState({streamsList: null})
                    this.setState({streamsListError: true})
                } else {
                    this.setState({streamsList: res.streams})
                    console.log(res.streams[0].channel._id)
                    let channelId = res.streams[0].channel._id
                    this.props.api.channels.channelByID({channelID: "lirik?client_id=XXXX"}, (err, res) => {
                        if (err) {
                            console.log(err)
                        } else {
                            console.log(res.stream)
                        }
                    })
                }
})

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.