GithubHelp home page GithubHelp logo

chris-perkins / swifttwitch Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 14.0 901 KB

๐Ÿ‘พ The New Twitch API for iOS; wrapped in Swift goodness ๐Ÿ‘พ

License: MIT License

Swift 99.22% Ruby 0.78%
swift4 swift twitch-api twitch helix helix-api ios ios-swift wrapper wrapper-api

swifttwitch's People

Contributors

chris-perkins avatar hawkins avatar kevinrpb avatar nick-potts avatar nihaals avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

swifttwitch's Issues

Pod install

Hi there,

It looks promising however when I install via cocoapod it get v0.1.0 which is missing 'clientID'.
So I tried your example project, run the pod install on it and it gets v0.1.2 (having clientID declared and handled...)

Then I tried to point at my pod file to pod 'SwiftTwitch', '~> 0.1.2' but it gets nothing. Saying what I have is up to date...

It's like my project thinks v0.1.0 is the latest and greatest but yours knows what's up...

Been fighting twitch for days... hahah

Can you help? All I want is the username, avatar and amount of followers.

Thanks in advance.

Flow

Problems with Receiving StreamData

I have been working with your API for quite some time now and it has helped me a lot of my current project, but I am running into an issue I have been unable to solve.


Twitch.Streams.getStreams(userNames: [streamer]){ result in
            switch result {
                case .success(let data):
                    print("User not Live")
                case .failure(let data, let response, let error):
                    print(data)
                    print(response)
                    print(error)
                    
                    if let data = data,
                       let jsonObject = try? JSONSerialization.jsonObject(with: data, options: .allowFragments),
                       let jsonDict = jsonObject as? [String: Any]{
                            print(jsonDict)
                       }
                    
            }
        }

The streamers that are offline show up in the success case, and the streamers who are online show up in the failure case, which is the opposite of what it should be. Because of this I cant access the StreamData because StreamData only works in the success case. Am I doing something wrong or is this is a problem with the framework itself?

Authentication Fails

In the current pod release, authentication fails due to Client ID not being passed in the request headers for API requests.

A fix has been applied to the repo, but I have not yet been able to update the pod itself (don't have a Mac rn). As a temporary workaround, you can add this project as a submodule.

I should be able to update the pod itself within the next week.

Support All New Twitch API Endpoints

There are a few categories and endpoints that are currently not supported, or for which support is broken. I made the following list to keep track of what's working/broken/missing. I will spend some more time tomorrow refining it.

Note:

  • (checkmark) indicates the endpoint is supported and working
  • (missing checkmark) means:
    • (+) Support is missing, it's a newer feature
    • (-) Support exists, but the endpoint is deprecated
    • (p) Support exists, but pagination might be broken
    • (?) Support exists, but we don't know if it works right now

Ads

  • (+) Start Commercial

Analytics

  • (?) Get Extension Analytics
  • (?) Get Game Analytics

Bits

  • (+) Get Cheermotes
  • (?) Get Bits Leaderboard
  • (+) Get Extensions Transactions

Clips

  • (?) Create Clip
  • (?) Get Clips

Entitlements

  • (+) Create Entitlement Grants Upload URL
  • (+) Get Code Status
  • (+) Redeem Code

Games

  • (?) Get Top Games
  • (?) Get Games

Moderation

  • (+) Check AutoMod Status
  • (+) Get Banned Users
  • (+) Get Banned Events
  • (+) Get Moderators
  • (+) Get Moderator Events

Search

  • (+) Search Categories
  • (+) Search Channels

Streams

  • (+) Get Stream Key
  • (?) Get Streams
  • (?) Get Streams Metadata
  • (?) Create Stream Marker
  • (?) Get Stream Markers
  • (+) Get Channel Information
  • (+) Modify Channel Information
  • (-) Get Followed Streams

Subscriptions

  • (+) Get Broadcaster Subscriptions

Tags

  • (+) Get All Stream Tags
  • (+) Get Stream Tags
  • (+) Replace Stream Tags

Users

  • (+) Create User Follows
  • (+) Delete User Follows
  • (?) Get Users
  • (?) Get Users Follows
  • (?) Update User
  • (?) Get User Extensions
  • (+) Get User Active Extensions
  • (+) Update User Extensions

Videos

  • (?) Get Videos

Webhooks

  • (+) Get Webhook Subscriptions

Hype Train

  • (+) Get Hype Train Events

Support more platforms

Hey, great job with the library!

I'm hoping to use it in TvOS, but I was greeted with this error when trying to install the pod:

$ pod install
Analyzing dependencies
[!] The platform of the target `my-project-here` (tvOS 13.0) is not compatible with `SwiftTwitch (0.1.0)`, which does not support `tvOS`.

Is there any particular reason this library doesn't support more platforms like MacOS, TvOS? I'd be happy to help port for support if needed, but I've never used Cocoapods before so I'm not sure where to look to see why it doesn't already work for more than iOS.

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.