4.0.2 • Published 6 years ago

loyalty_program_api v4.0.2

Weekly downloads
1
License
Unlicense
Repository
-
Last release
6 years ago

loyalty_program_api

LoyaltyProgramApi - JavaScript client for loyalty_program_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: 4.0.2
  • Package version: 4.0.2
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

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

Then install it via:

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

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('loyalty_program_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/YOUR_USERNAME/loyalty_program_api then install it via:

    npm install YOUR_USERNAME/loyalty_program_api --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 LoyaltyProgramApi = require('loyalty_program_api');

var api = new LoyaltyProgramApi.DevelopersApi()

var opts = { 
  'deviceInfo': new LoyaltyProgramApi.UserDeviceInfo() // {UserDeviceInfo} device information object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.associateFCMId(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://www.lineadgroup.com/loyaltyprogram/api/endpoints/clubfoals/

ClassMethodHTTP requestDescription
LoyaltyProgramApi.DevelopersApiassociateFCMIdPOST /gcm_id/asociar_gcm_id.inc.phpassociate fcm id
LoyaltyProgramApi.DevelopersApibuildPrizePOST /android-build_prize.phpbuilds prize content
LoyaltyProgramApi.DevelopersApichangeInfoPOST /android-modificar_socio.phpchange user's info.
LoyaltyProgramApi.DevelopersApichangePasswordPOST /android-modificar_clave.phpchange password.
LoyaltyProgramApi.DevelopersApicheckUserPOST /android-validar_dni.phpverifies the user exists
LoyaltyProgramApi.DevelopersApicheckUser2POST /android-validar_primer_paso.phpverifies the user exists
LoyaltyProgramApi.DevelopersApicheckUserMailPOST /android-verificar_mail_socio.phpverifies the user exists
LoyaltyProgramApi.DevelopersApicontactFormPOST /android-enviar_formulario_contacto.phpsend contact form.
LoyaltyProgramApi.DevelopersApidettachFMCIdPOST /gcm_id/desloguear_socio.inc.phpassociate fcm id
LoyaltyProgramApi.DevelopersApigetCategoriesPOST /android-obtener_rubros.phpgets the categories of prizes
LoyaltyProgramApi.DevelopersApigetCitiesGET /get-cities.phpget list of cities.
LoyaltyProgramApi.DevelopersApigetCreditsGET /creditos/cmb_creditos.inc.phpget credits.
LoyaltyProgramApi.DevelopersApigetCreditsDetailsGET /creditos/leer_credito.inc.phpget credit details.
LoyaltyProgramApi.DevelopersApigetExchangeTicketPOST /android-ticket.phpgets user information
LoyaltyProgramApi.DevelopersApigetMilesPOST /android-leer_millas.phpgets miles
LoyaltyProgramApi.DevelopersApigetMilesDetailsPOST /android-movimiento_de_millas.phpgets miles detail
LoyaltyProgramApi.DevelopersApigetModulesGET /android-leer_modulos.phpget app configuration.
LoyaltyProgramApi.DevelopersApigetNewsPOST /noticias/buscar_noticias_etiquetados.inc.phpget news for a tagged user
LoyaltyProgramApi.DevelopersApigetNewsDetailsPOST /noticias/leer_noticia.inc.phpget news article details.
LoyaltyProgramApi.DevelopersApigetNewsListPOST /noticias/anticipo_noticias.inc.phpget news list.
LoyaltyProgramApi.DevelopersApigetNewsWithTagPOST /noticias/buscar_noticias_tag.inc.phpget news for a tag
LoyaltyProgramApi.DevelopersApigetNewsWithUserPOST /noticias/leer_etiquetados_segmentado.inc.phpget news for a user
LoyaltyProgramApi.DevelopersApigetPointsPOST /android-leer_puntos.phpgets user information
LoyaltyProgramApi.DevelopersApigetPointsDetailsPOST /android-movimiento_de_puntos.phpgets user information
LoyaltyProgramApi.DevelopersApigetPrizesFromCategoryPOST /android-obtener_premios_del_rubro.phpget prizes from category
LoyaltyProgramApi.DevelopersApigetProvincesGET /get-provinces.phpget list of provinces.
LoyaltyProgramApi.DevelopersApigetRedemptionsPOST /android-obtener_canjes.phpget list of redemptions.
LoyaltyProgramApi.DevelopersApigetSliderImagesPOST /android-obtener_imagenes_slide.phpget slider images
LoyaltyProgramApi.DevelopersApigetSubsidiariesPOST /android-sucursales_club.phpget subsidiaries
LoyaltyProgramApi.DevelopersApigetSubsidiariesCitymarketingPOST /android-obtener_sucursales_citymarketing.phpget subsidiaries list details
LoyaltyProgramApi.DevelopersApigetSubsidiariesListPOST /android-obtener_sucursales.phpget subsidiaries list details
LoyaltyProgramApi.DevelopersApigetSweepstakeDetailsPOST /concursos/leer_concurso.inc.phpget sweepstake details
LoyaltyProgramApi.DevelopersApigetSweepstakesPOST /concursos/leer_concursos_vigentes.inc.phpget sweepstakes.
LoyaltyProgramApi.DevelopersApigetTagsWithUserPOST /noticias/leer_tags_segmentados.inc.phpget tag
LoyaltyProgramApi.DevelopersApigetUnreadNewsPOST /noticias/cantidad_noticias_sin_leer.inc.phpget unread news.
LoyaltyProgramApi.DevelopersApigetUserInfoPOST /android-socios.phpgets user information
LoyaltyProgramApi.DevelopersApigetVouchersGET /android-traer_cupones.phpget list of vouchers.
LoyaltyProgramApi.DevelopersApijoinSweepstakePOST /concursos/participar_concurso.inc.phpjoin sweepstake
LoyaltyProgramApi.DevelopersApiloginUserPOST /android-login.phplogs the user in
LoyaltyProgramApi.DevelopersApiprizePaymentDetailsPOST /android-prize_payment_details.phpget payment details for prize
LoyaltyProgramApi.DevelopersApirecoverPasswordPOST /android-recordatorio_clave.phprecover password
LoyaltyProgramApi.DevelopersApiredeemVoucherPOST /android-descarga_cupon.phpredeem voucher.
LoyaltyProgramApi.DevelopersApiregisterFCMIdPOST /gcm_id/registro_gcm_id.inc.phpregister fcm id
LoyaltyProgramApi.DevelopersApiregisterPrizeVisitPOST /android-registrar_visita_premio.phpregister visit to prize
LoyaltyProgramApi.DevelopersApiregisterUserPOST /android-alta_socio.phpRegisters a new user
LoyaltyProgramApi.DevelopersApireservePrizePOST /android-reserva_premio_beneficio.phpreserve a prize.
LoyaltyProgramApi.DevelopersApisetUserEmailPOST /android-validar_mail.phpassociates an email address to a user

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.