Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to helix API #852

Merged
merged 45 commits into from
Jan 24, 2022
Merged

Switch to helix API #852

merged 45 commits into from
Jan 24, 2022

Conversation

bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Jan 11, 2022

Resolves #849


Checklist

  • TwitchAdapter & TwitchSerializer
    • Bearer token, Accept header removal
    • Rate limit handling (not important right now, can be done later)
    • Payload normalization
    • Metadata extraction
  • Twitch related Models + Adapters + Serializers + Transforms
    • Removal of unsupported stuff
      • TwitchStreamFeatured
      • TwitchStreamSummary
      • TwitchSearchStream
    • TwitchImageTransform
    • TwitchGame
    • TwitchGameTop
    • TwitchStream
    • TwitchUser
    • TwitchChannel
    • TwitchStreamTag (will be implemented later)
    • TwitchTeam
    • TwitchSearchGame
    • TwitchSearchChannel (searches online&offline "streams")
    • TwitchStreamFollowed
    • TwitchUserFollowed
  • AuthService
    • Update OAuth scopes
    • Add OAuth state parameter
    • Auth model
  • StreamingService
    • TwitchStream / TwitchUser data access
    • TwitchStream polling
    • Stream model
    • ModalStreamingComponent
  • NotificationService
    • TwitchStreamFollowed polling
    • TwitchStream / TwitchUser data access
    • Rewrite most tests
  • ChatService
  • Components
    • button
      • ChannelButtonComponent
      • OpenChatComponent
      • ShareChannelComponent
      • TwitchEmotesComponent
    • list
      • GameItemComponent
      • StreamItemComponent
      • ChannelItemComponent
      • TeamItemComponent
      • SettingsChannelItemComponent
    • stream
      • StatsRowComponent
      • StreamPresentationComponent
      • StreamPreviewImageComponent
    • PreviewImageComponent
    • SearchBarComponent
      • Search model
        • Update LocalStorage ("streams" filter removal)
    • Remove QuickBarRandomStreamComponent
  • Routes
    • Remove FeaturedRoute
      • Update LocalStorage (homepage / hotkeys)
    • Mixins
      • InfiniteScrollMixin
      • InfiniteScrollPaginationMixin
      • FilterLanguagesMixin (will (re-)implement multi-language filtering later - once again supported on helix)
    • UserFollowedStreamsRoute
    • UserFollowedChannelsRoute
    • GamesRoute
      • GamesIndexRoute
      • GamesGameRoute
    • StreamsRoute
    • ChannelRoute
      • ChannelIndexRoute
      • ChannelTeamsRoute
      • ChannelSettingsRoute
    • TeamRoute
      • TeamIndexRoute
      • TeamInfoRoute
      • TeamMembersRoute
    • SettingsChannelsRoute
    • SearchRoute
    • WatchingRoute

Known issues

  • TwitchTeam.info requires a markdown parser

- adapterRequestFactory: for easier API response stubbing
- assertRelationships: for checking model relationship data

Also

- deeply clone mocked adapter response
  the TwitchSerializer will normalize the response object in-place
TwitchAdapter:
- remove "Accept" header
- change OAuth token to Bearer token
- remove urlFragments and AuthService injection
- refactor findId logic
  - use same param name for findRecord and findMany
  - fall back to serializer's primaryKey if findIdParam is null
  - switch to helix API's multi-ID serialization style
  - limit number of ID requests via findIdMax

TwitchSerializer:
- change default primaryKey from "_id" to "id"
- normalize "data" payload property
- treat everything non-"data" as metadata
- TwitchChannelFollowed
- TwitchRoot
- TwitchSearchStream
- TwitchStreamFeatured
- TwitchStreamSummary
- remove FeaturedRoute and update application router
- change default homepage to StreamsRoute
- add update logic for local storage
- remove/change links, update MainMenuComponent and fix translations
- remove FeaturedRoute hotkeys and update hotkeys for other routes
- remove filtering logic
- simplify willFetchContent
- simplify hasFetchedAll
- split calcFetchSize into calcFetchSize + setFetchSize
- remove most Ember.get calls
- rewrite tests, split up into CSS and Mixin tests
- add InfiniteScrollPaginationMixin based on InfiniteScrollCursorMixin
- remove InfiniteScrollOffsetMixin and InfiniteScrollCursorMixin
- replace imports in various routes with InfiniteScrollPaginationMixin
- fix InfiniteScrollCommonMixin and wait for mapped promises to resolve

Next:
- fix each route's infinite-scroll and pagination parameters
- fix each route's model hooks and related stuff
- test pagination mixin via route tests
- reference games by ID instead of names in GamesGameRouter
  This will break custom game homepages, but there's nothing that can
  be done here to automatically fix this. Users will have to reset their
  custom homepage.
- inherit from UserIndexRoute
- fix infinite-scroll / pagination parameters
- reformat templates
- inherit from UserIndexRoute
- fix infinite-scroll / pagination parameters
- reformat template
- fix infinite-scroll / pagination parameters
- remove custom model hook for the old kraken API bug and remove tests
- reformat template
- fix infinite-scroll / pagination parameters
- remove controller and query parameters for sorting (unsupported now)
- reformat template
- update route parameter name in router
- inherit from UserIndexRoute
- fix/rewrite model hooks
- fix infinite-scroll / pagination parameters
- reformat templates
- update route parameter name in router
- inherit from UserIndexRoute
- fix/rewrite model hooks
- reformat templates
Querying random streams is not possible anymore on the helix API, as
there's no available offset query parameter. At most 100 streams can be
queried in one request and then new requests can be made with the
provided pagination cursor query parameter. This means that finding
random streams becomes unnecessarily expensive at a certain point.
- remove "streams" filter
- remove old and unused label code
- add localStorage update logic and add tests
- update addRecord logic and add tests
- reformat template
- inherit from UserIndexRoute
- fix/rewrite model hooks
- reformat template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Twitch helix API
1 participant