1.0.19 • Published 3 years ago

face_poker_api v1.0.19

Weekly downloads
1
License
Unlicense
Repository
-
Last release
3 years ago

face_poker_api

FacePokerApi - JavaScript client for face_poker_api This is a documentation for the Face Poker application. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install face_poker_api --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your face_poker_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('face_poker_api') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/face_poker_api then install it via:

    npm install YOUR_USERNAME/face_poker_api --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var FacePokerApi = require('face_poker_api');

var api = new FacePokerApi.CandidateApi()

var tableId = "tableId_example"; // {String} ID of table

var body = new FacePokerApi.Candidate(); // {Candidate} Candidate parameters

api.addCandidate(tableId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/krzynool/FacePokerSwag/1.0.0

ClassMethodHTTP requestDescription
FacePokerApi.CandidateApiaddCandidatePOST /table/{tableId}/candidateRequest to play
FacePokerApi.CandidateApideleteCandidateDELETE /table/{tableId}/candidate/{candidateId}See all player requests
FacePokerApi.CandidateApigetCandidatesGET /table/{tableId}/candidateSee all player requests
FacePokerApi.CardsApigetCardsGET /table/{tableId}/player/{playerId}/cardsGet my cards
FacePokerApi.HeroApieditHeroPUT /table/{tableId}/heroRepresentation of me
FacePokerApi.HeroApiquitGameDELETE /table/{tableId}/heroQuit the game
FacePokerApi.MovesApimovePOST /table/{tableId}/player/{playerId}/moveMake a move
FacePokerApi.ParticipantApiaddPlayerPOST /table/{tableId}/playerAdd a player
FacePokerApi.ParticipantApideletePlayerDELETE /table/{tableId}/player/{playerId}Delete a player
FacePokerApi.ParticipantApieditPlayerPUT /table/{tableId}/player/{playerId}Edit a player
FacePokerApi.ParticipantApigetPlayerGET /table/{tableId}/player/{playerId}Edit a player
FacePokerApi.TableApicreateTablePOST /tableCreate new table
FacePokerApi.TableApigetTableGET /table/{tableId}Fetch existing table by ID
FacePokerApi.TableApiupdateTablePUT /table/{tableId}Update an existing table

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago