Code Monkey home page Code Monkey logo

handball-ch-widget's Introduction

Handball Schweiz API Widget

This project allows you to view and embed last results and next games for teams and clubs using the API from Handball Schweiz

Introduction

This is a small react app, optimized to run on Cloudflare Pages. The serverless function will add the club specific auth token for API requests going to the API from Handball Schweiz. You need to set the following environment variables on the cloudflare pages project:

  • API_KEY: with the base64 encoded API key from Handball Schweiz
  • FRAME_ANCESTORS: set a space separated list of domains which should be added to the frame-ancestor CSP header

How to use

You can iframe the following URLs:

Controlling the number of results and next games

By default the last 10 and the next 10 games are displayed for both club and team. This can be changed by adding the following query parameters:

  • results: for defining the number of played games displayed
  • next: for defining the number of planned games displayed

Hence, if you want do display the last 20 results and the next 30 games of club 140675, you would use the following URL:

https://${hostname}/verein/140675?results=20&next=30

Acknowledgements

This project has been created in collaboration with the HC KTV Altdorf.

handball-ch-widget's People

Contributors

dependabot[bot] avatar nimdanitro avatar snyk-bot avatar

Stargazers

 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.