GithubHelp home page GithubHelp logo

i-do-dev / cee-store-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from currikieducationalexperiences/cee-store-service

0.0 0.0 0.0 1.15 MB

JavaScript 84.14% Smarty 1.30% Dockerfile 0.13% HTML 14.42%

cee-store-service's Introduction

C2E Store Service Setup Guide

Please execute the folowing commands cefore starting the App for the first time.

npm install

npm run migrate

npx sequelize-cli db:seed:all

npm start

Curriki C2E Store Service API Documentation (Open API Specification)

Welcome to the Curriki C2E Store Service API documentation. ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

Table of Contents


Base URL

All endpoints are relative to the base URL:

https://service-host/api/v1


Authentication

API Key

All endpoints require an x-api-key header for authentication. Different roles have different API keys for access.


C2E Listing Routes

Create C2E Listing

Endpoint to create a new C2E Listing.

  • URL: /c2e-listings
  • Method: POST
  • Summary: Create C2E Listing
  • Parameters:
    • x-api-key (header) - API Key (role: cee-publisher-service)
      • Type: string
      • Default: API Key (role: cee-publisher-service)
      • Required: true
    • payload (body) - User credentials
      • Type: object
      • Properties:
        • ceeId (string) - C2E Id (Example: "5f5e2e3e-3e3e-4e4e-5e5e-6e6e7e7e7e7e")
        • name (string) - C2E Listing Name (Example: "C2E Listing Name")
        • subject (array of strings) - Educational subjects (Example: ["Mathematics"])
        • educationLevel (array of strings) - Education levels (Example: ["Grade 1"])
        • keywords (array of strings) - Keywords for the listing (Example: ["Mathematics", "Grade 1", "Addition", "Subtraction"])
  • Responses:
    • 200:
      • Description: Success
      • Schema:
        {
          "code": 200,
          "message": "Success",
          "result": "C2E Listing created successfully!"
        }
    • 400:
      • Description: Failed
      • Schema:
        {
          "code": 400,
          "message": "Failed to create C2E Listing!",
          "result": null
        }

C2E Subscription Routes

Get C2E Player Subscriptions Manifest

Endpoint to retrieve the C2E Player Subscriptions Manifest.

  • URL: /c2e-subscriptions/manifest
  • Method: GET
  • Summary: Get C2E Player Subscriptions Manifest
  • Parameters:
    • x-api-key (header) - API Key (role: cee-player-service)
      • Type: string
      • Default: API Key (role: cee-player-service)
      • Required: true
  • Responses:
    • 200:
      • Description: Success
      • Schema:
        {
          "code": 200,
          "message": "Success",
          "result": "C2E Player Subscriptions Manifest"
        }
    • 400:
      • Description: Failed
      • Schema:
        {
          "code": 400,
          "message": "Failed to show C2E Subscriptions!",
          "result": null
        }

Get C2E Stream Token

Endpoint to get a C2E Stream token.

  • URL: /stream/token
  • Method: GET
  • Summary: Get C2E Stream token (called from player service)
  • Parameters:
    • x-api-key (header) - Authentication and Authorization
      • Type: string
      • Default: APIKey (role: cee-player-service)
      • Required: true
    • subid (query) - C2E Subscription ID setup on the player service
      • Type: string
      • Required: true
  • Responses:
    • 200:
      • Description: Success
      • Schema:
        {
          "code": 200,
          "message": "Success",
          "result": [
            {
              "ceeId": "C2E ID",
              "token": "C2E Stream Token",
              "expiresAt": "C2E Stream Token Expiry Date"
            }
          ]
        }
    
    
    

Get C2E Manifest

Endpoint to get a C2E Manifest.

  • URL: /stream/manifest
  • Method: GET
  • Summary: Get C2E Manifest (called from player service)
  • Parameters:
    • x-api-key (header) - Authentication and Authorization
      • Type: string
      • Default: APIKey (role: cee-player-service)
      • Required: true
    • subid (query) - C2E Subscription ID
      • Type: string
      • Required: true
  • Responses:
    • 200:
      • Description: Success
      • Schema:
        {
          "code": 200,
          "message": "Success",
          "result": [
            {
              "ceeId": "C2E Subscription ID",
              "manifest": "C2E Manifest"
            }
          ]
        }

API Key Routes

Get API Keys

Endpoint to retrieve API Keys.

  • URL: /keys
  • Method: GET
  • Summary: Get API Keys
  • Parameters:
    • Authorization (header) - Authorization token
      • Type: string
      • Default: Bearer APIKey
      • Required: true
  • Responses:
    • 200:
      • Description: Success
      • Schema:
        {
          "code": 200,
          "message": "Success",
          "result": [
            {
              "key": "APIKey",
              "clientRole": "cee-publisher-service | cee-player-service",
              "clientEmail": "[email protected]"
            }
          ]
        }

Swagger Documentation

Swagger Documentation can be found on following link https://service-host/api-docs/

Database Diagram

db

cee-store-service's People

Contributors

i-do-dev avatar cpttony avatar yesidevelop avatar mehmoodtkxel 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.