Skip to content

Auto generated swagger javascript client for Microsoft's custom vision API

Notifications You must be signed in to change notification settings

mweiss/custom-vision-training-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

training_api

TrainingApi - JavaScript client for training_api No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0
  • Build package: io.swagger.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 training_api --save

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.

Getting Started

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

var TrainingApi = require('training_api');

var api = new TrainingApi.DefaultApi()

var projectId = "projectId_example"; // {String} The project id.

var imageData = "/path/to/file.txt"; // {File} 

var opts = { 
  'tagIds': ["tagIds_example"] // {[String]} The tags ids to associate with the image batch.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createImagesFromData(projectId, imageData, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Training/

Class Method HTTP request Description
TrainingApi.DefaultApi createImagesFromData POST /projects/{projectId}/images/image Adds the provided images to the current project iteration
TrainingApi.DefaultApi createImagesFromPredictions POST /projects/{projectId}/images/predictions Adds the specified predicted images to the current project iteration
TrainingApi.DefaultApi createImagesFromUrls POST /projects/{projectId}/images/url Adds the provided images to the current project iteration
TrainingApi.DefaultApi createProject POST /projects Create a project
TrainingApi.DefaultApi createTag POST /projects/{projectId}/tags Creates a tag for the project
TrainingApi.DefaultApi deleteImageLabel DELETE /projects/{projectId}/images/{imageId}/label/{labelId} Delete a image label
TrainingApi.DefaultApi deleteImages DELETE /projects/{projectId}/images Delete images from the current project iteration
TrainingApi.DefaultApi deleteIteration DELETE /projects/{projectId}/iterations/{iterationId} Delete a specific iteration of a project
TrainingApi.DefaultApi deletePrediction DELETE /projects/{projectId}/predictions
TrainingApi.DefaultApi deleteProject DELETE /projects/{projectId} Delete a specific project
TrainingApi.DefaultApi deleteTag DELETE /projects/{projectId}/tags/{tagId} Delete a tag for the project
TrainingApi.DefaultApi getAccountInfo GET /account
TrainingApi.DefaultApi getAllTaggedImages GET /projects/{projectId}/images/tagged/all Gets all tagged images for a given project iteration
TrainingApi.DefaultApi getAllUntaggedImages GET /projects/{projectId}/images/untagged Gets all untagged images for a given project iteration
TrainingApi.DefaultApi getDomain GET /domains/{domainId} Gets information about a specific domain
TrainingApi.DefaultApi getDomains GET /domains Get a list of the avaiable domains
TrainingApi.DefaultApi getImagesByTags GET /projects/{projectId}/images/tagged Gets tagged images for a given project iteration
TrainingApi.DefaultApi getIteration GET /projects/{projectId}/iterations/{iterationId} Get a specific iteration
TrainingApi.DefaultApi getIterationPerformance GET /projects/{projectId}/iterations/{iterationId}/performance Get detailed performance information about an iteration
TrainingApi.DefaultApi getIterations GET /projects/{projectId}/iterations Get iterations for the project
TrainingApi.DefaultApi getNextPredictionResults POST /projects/{projectId}/predictions/next
TrainingApi.DefaultApi getPredictionResults GET /projects/{projectId}/predictions
TrainingApi.DefaultApi getProject GET /projects/{projectId} Get a specific project
TrainingApi.DefaultApi getProjects GET /projects Gets the user's projects
TrainingApi.DefaultApi getTag GET /projects/{projectId}/tags/{tagId} Gets information about a specific tag
TrainingApi.DefaultApi getTags GET /projects/{projectId}/tags Get's the project tags for a given project and iteration
TrainingApi.DefaultApi postImageLabel POST /projects/{projectId}/images/{imageId}/label Post a label to a specific image
TrainingApi.DefaultApi trainProject POST /projects/{projectId}/train Queues training of the current iteration for the project
TrainingApi.DefaultApi updateIteration PATCH /projects/{projectId}/iterations/{iterationId} Update a specific iteration
TrainingApi.DefaultApi updateProject PATCH /projects/{projectId} Update a specific project
TrainingApi.DefaultApi updateTag PATCH /projects/{projectId}/tags/{tagId} Updates a tag for the project

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

Auto generated swagger javascript client for Microsoft's custom vision API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published