Skip to content

kiku-jw/aliseeks-javascript-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

aliseeks-api

AliseeksApi - JavaScript client for aliseeks-api AliExpress product searching and product details retrieval API. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.1.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 aliseeks-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 aliseeks-api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('aliseeks-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/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 AliseeksApi = require('aliseeks-api');

var defaultClient = AliseeksApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-CLIENT-ID'] = "Token"

var api = new AliseeksApi.ProductsApi()
var opts = {
  'productRequest': new AliseeksApi.ProductRequest() // {ProductRequest} The request body of get product 
};
api.getProduct(opts).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://api.aliseeks.com/v1

Class Method HTTP request Description
AliseeksApi.ProductsApi getProduct POST /products Get products details as an aggregated request from AliExpress in realtime.
AliseeksApi.ProductsApi getProductDetails POST /products/details Gets product details from AliExpress in realtime.
AliseeksApi.ProductsApi getProductHtmlDescription POST /products/description/html Get product HTML description from AliExpress in realtime.
AliseeksApi.ProductsApi getProductReviews POST /products/reviews Get product reviews from AliExpress in realtime
AliseeksApi.ProductsApi getProductShipping POST /products/shipping Gets product shipping information AliExpress in realtime.
AliseeksApi.ProductsApi getProductSkus POST /products/variations Gets product skus / variation information from AliExpress in realtime.
AliseeksApi.ProductsApi getProductTransactions POST /products/transactions Get product transactions from AliExpress in realtime.
AliseeksApi.SearchApi realtimeSearch POST /search/realtime Searches AliExpress in realtime
AliseeksApi.SearchApi search POST /search Searches AliExpress in non-realtime. Uses the Aliseeks.com datasource which is continually updated from AliExpress.
AliseeksApi.SearchApi searchBestSelling POST /search/bestSelling Retrieves best selling products from AliExpress in realtime.
AliseeksApi.SearchApi searchByImage POST /search/image Searches AliExpress by image in realtime.
AliseeksApi.SearchApi uploadImageByUrl POST /search/image/upload Uploads an image to AliExpress to allow it to be used in the image search endpoint

Documentation for Models

Documentation for Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-CLIENT-ID
  • Location: HTTP header