Git Product home page Git Product logo

twitch-custom-notification's Introduction

twitch-custom-notification ๐Ÿ””

When a client subscribes to a streamer registered on the server,

it is a server that sends a notification through FCM according to the status.

Built to help with Twitch push notifications that sometimes don't come or come late.

Getting Started

Requirements

  • Node.js
  • Twitch API
  • Firebase (for firebase cloud messaging)
  • MongoDB (for token management)

Add .env

/server/.env

MONGODB_URI=<MongoDB_URI>
PORT=<Port number>
TWITCH_API_CLIENT_ID=<Twitch API Client Id>
TWITCH_API_BEARER_TOKEN=<Twitch API Bearer Token>
TWITCH_API_BASE_URL=https://api.twitch.tv/helix

How to get client id and bearer token ?

Add firebase service account key

/server/serviceAccountKey.json

How to get this ?

Set constants

Set live broadcast check scheduler execution cycle (second)

/server/src/constants/interval.ts

List of streamers to check live

/server/src/constants/stream.ts

Install

# /server
$ yarn install

Run

# /server
$ yarn start

API

[GET] /health

You can check if the server is running normally.

[POST] /api/token/registration

Register the fcm token generated by the client.

Request Body
{
    token: String
}

[POST] /api/token/subscribe

Set up to receive streamer notifications of listings sent by client.

Request Body
{
    token: String
    topics: String[]
}

twitch-custom-notification's People

Contributors

negu63 avatar

Watchers

 avatar

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.