Skip to content

zivost/flipkart-affiliate-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flipkart-affiliate-client

NPM version Build Status Baikal

NPM

un-official client for Flipkart Affiliates API

Installation

Install using npm:

npm install flipkart-affiliate-client

Usage

Require library

var affiliate = require('flipkart-affiliate-client');

Create client

var client = affiliate.createClient({
  FkAffId: '(affiliate_id)',
  FkAffToken: '(affiliate_token)',
  responseType: '(json or xml)'
});

Examples

examples based on usage

Category Feed

client.getCategoryFeed({
  trackingId: 'xxxxx'
}, function(err, result){
    if(!err){
      console.log(result);
    }else {
      console.log(err);
    }
});

Product Feed

client.getProductsFeed({
  url: '(url obtained from Category Feed)'
}, function(err, result){
    if(!err){
      console.log(result);
    }else {
      console.log(err);
    }
});

Search Query based on Keywords

client.keywordSearch({
    query: "iphone",
    resultCount: "1"
  }, function(err, results){
    if(err){
      console.log(err);
    } else{
      console.log(results);
    }
});

Search Query based on Product

client.idSearch({
  id: "MOBDPPZZPXVDJHSQ"
}, function(err, result){
    if(!err){
      console.log(result);
    }else {
      console.log(err);
    }
});

All Offers

client.getAllOffers(null,function(err, resp){
  if(!err){
    console.log(resp);
  }else{
    console.log(err);
  }
});

Deals of the Day (DOTD) Offer

client.getDealsOfDay(null,function(err, resp){
  if(!err){
    console.log(resp);
  }else{
    console.log(err);
  }
});

Orders Report

client.getOrdersReport({
  startDate: '2015-10-22',
  endDate: '2016-02-04',
  status: 'cancelled',
  offset: '0'
}, function(err, result){
    if(!err){
      console.log(result);
    }else {
      console.log(err);
    }
});

App Install Report

client.getAppInstReport({
  startDate: '2015-10-22',
  endDate: '2016-1-04',
  status: 'approved'
}, function(err, result){
    if(!err){
      console.log(result);
    }else {
      console.log(err);
    }
});

About

un-official Node.js client for Flipkart Affiliates API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published