Skip to content

A javascript NPM package for interacting with the TroopTrack API via the Developer Program. Generated using OpenAPI-Generator-CLI

Notifications You must be signed in to change notification settings

lazyshamrock/TroopTrack-API

Repository files navigation

api_title

ApiTitle - JavaScript client for api_title No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1
  • Package version: 0.0.1
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

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

Then install it via:

npm install api_title --save

Finally, you need to build the module:

npm run build
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

To use the link you just defined in your project, switch to the directory you want to use your api_title from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

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

    npm install GIT_USER_ID/GIT_REPO_ID --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):

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 ApiTitle = require('api_title');


var api = new ApiTitle.AchievementsApi()
var xPartnerToken = "xPartnerToken_example"; // {String} Your secret partner token
var xUserToken = "xUserToken_example"; // {String} The token you received when you authenticated the user
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getV1Achievements(xPartnerToken, xUserToken, callback);

Documentation for API Endpoints

All URIs are relative to http://<trooptrack_subdomain>.trooptrack.com/api

Class Method HTTP request Description
ApiTitle.AchievementsApi getV1Achievements GET /v1/achievements
ApiTitle.AchievementsApi getV1AchievementsId GET /v1/achievements/{id}
ApiTitle.AwardTypesApi getV1AwardTypes GET /v1/award_types
ApiTitle.AwardTypesApi getV1AwardTypesId GET /v1/award_types/{id}
ApiTitle.EventsApi getV1Events GET /v1/events
ApiTitle.EventsApi getV1EventsId GET /v1/events/{id}
ApiTitle.EventsApi getV1EventsTypes GET /v1/events/types
ApiTitle.EventsApi postV1Events POST /v1/events
ApiTitle.EventsApi postV1EventsEventIdAttendance POST /v1/events/{event_id}/attendance
ApiTitle.EventsApi postV1EventsEventIdMultipleRsvp POST /v1/events/{event_id}/multiple_rsvp
ApiTitle.EventsApi putV1EventsIdRsvp PUT /v1/events/{id}/rsvp
ApiTitle.MailingListsApi getV1MailingLists GET /v1/mailing_lists
ApiTitle.MailingListsApi postV1MailingListsId POST /v1/mailing_lists/{id}
ApiTitle.OfflineApi getV1Offline GET /v1/offline
ApiTitle.PhotoAlbumsApi getV1PhotoAlbums GET /v1/photo_albums
ApiTitle.PhotoAlbumsApi getV1PhotoAlbumsId GET /v1/photo_albums/{id}
ApiTitle.PhotoAlbumsApi postV1PhotoAlbumsId POST /v1/photo_albums/{id}
ApiTitle.TokensApi getV1Tokens GET /v1/tokens
ApiTitle.TokensApi getV1TokensMyBasicInfo GET /v1/tokens/my_basic_info
ApiTitle.TokensApi postV1Tokens POST /v1/tokens
ApiTitle.UserAchievementsApi getV1UserAchievements GET /v1/user_achievements
ApiTitle.UserAchievementsApi getV1UserAchievementsId GET /v1/user_achievements/{id}
ApiTitle.UserAchievementsApi getV1UserAchievementsParameters GET /v1/user_achievements/parameters
ApiTitle.UserAchievementsApi postV1UserAchievementsId POST /v1/user_achievements/{id}
ApiTitle.UsersApi getV1Users GET /v1/users
ApiTitle.UsersApi getV1UsersId GET /v1/users/{id}
ApiTitle.UsersApi postV1UsersId POST /v1/users/{id}
ApiTitle.YouthsApi postV1Youths POST /v1/youths

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

About

A javascript NPM package for interacting with the TroopTrack API via the Developer Program. Generated using OpenAPI-Generator-CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published