Skip to content

FaxAPI/faxto-javascript

Repository files navigation

faxto_rest_api_client_for_javascript

FaxtoRestApiClientForJavascript - JavaScript client for faxto_rest_api_client_for_javascript This is Fax.to REST API client for Javascript. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://fax.to/contact-us

Installation

npm

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

Then install it via:

npm install faxto_rest_api_client_for_javascript --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 faxto_rest_api_client_for_javascript from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('faxto_rest_api_client_for_javascript') 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/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, 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 FaxtoRestApiClientForJavascript = require('faxto_rest_api_client_for_javascript');

var api = new FaxtoRestApiClientForJavascript.FaxReceivingApi()

var COUNTRY_CODE = 56; // {Number} Indicates the country code in its ISO 3166-1 alpha-3 format

var STATE_ID = 56; // {Number} The numerical identifier for the state

var apiKey = "apiKey_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.areaCodesCountryCodeStateIdGet(COUNTRY_CODE, STATE_ID, apiKey, callback);

Documentation for API Endpoints

All URIs are relative to https://api.fax.to/api/v2

Class Method HTTP request Description
FaxtoRestApiClientForJavascript.FaxReceivingApi areaCodesCountryCodeStateIdGet GET /areacodes/{COUNTRY_CODE}/{STATE_ID} This API gets a list of countries with its area code
FaxtoRestApiClientForJavascript.FaxReceivingApi countriesCountryCodeDidGroupsGet GET /countries/{countryCode}/didgroups This API gets a list of DID groups
FaxtoRestApiClientForJavascript.FaxReceivingApi countriesGet GET /countries This API gets a list of countries available in the Fax.to coverage
FaxtoRestApiClientForJavascript.FaxReceivingApi incomingFaxesGet GET /incoming-faxes This API gets a list of incoming faxes
FaxtoRestApiClientForJavascript.FaxReceivingApi incomingFaxesRecipientGet GET /incoming-faxes/{recipient} This API gets a list of incoming faxes for a specific recipient
FaxtoRestApiClientForJavascript.FaxReceivingApi numbersGet GET /numbers This API gets a list of numbers to get the current configuration of one or multiple number
FaxtoRestApiClientForJavascript.FaxReceivingApi provisionNumbersGet GET /countries/didgroups/{did_group_id}/provision This API gets a list of provisioned numbers
FaxtoRestApiClientForJavascript.FaxReceivingApi statesCountryCodeGet GET /states/{COUNTRY_CODE} This API gets a list of states of a given country available in the Fax.to coverage
FaxtoRestApiClientForJavascript.FaxSendingApi faxDocumentIdCostsGet GET /fax/{document_id}/costs This API is for computing the cost of the fax to be sent
FaxtoRestApiClientForJavascript.FaxSendingApi faxHistoryGet GET /fax-history This API gets the history of a fax
FaxtoRestApiClientForJavascript.FaxSendingApi faxJobIdStatusGet GET /fax/{fax_job_id}/status This API gets the status of a fax
FaxtoRestApiClientForJavascript.FaxSendingApi faxPost POST /fax This API is for sending a new fax in any fax numbers anywhere in the world
FaxtoRestApiClientForJavascript.FaxSendingApi fileCleanGet GET /file-clean This API is used for cleaning a document
FaxtoRestApiClientForJavascript.FaxSendingApi fileGeneratePreviewGet GET /file-generate-preview This API generates a preview of a document
FaxtoRestApiClientForJavascript.FaxSendingApi filesDocumentIDDelete DELETE /files/{document_id} This API deletes a document
FaxtoRestApiClientForJavascript.FaxSendingApi filesGet GET /files This API gets all the files of a certain user
FaxtoRestApiClientForJavascript.UserApi balanceGet GET /balance This API gets the balance of a user account
FaxtoRestApiClientForJavascript.UserManagementApi subUserPost POST /subuser This API creates a subuser
FaxtoRestApiClientForJavascript.UserManagementApi userLoginPost POST /user/login This API is used for logging in on an existing user account
FaxtoRestApiClientForJavascript.UserManagementApi userPost POST /user This API registers a new user account

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: api_key
  • Location: HTTP header

About

Faxto REST API client for Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published