loyalty_program_api

ERROR_UNKNOWN

Usage no npm install needed!

<script type="module">
  import loyaltyProgramApi from 'https://cdn.skypack.dev/loyalty_program_api';
</script>

README

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/

Class Method HTTP request Description
LoyaltyProgramApi.DevelopersApi associateFCMId POST /gcm_id/asociar_gcm_id.inc.php associate fcm id
LoyaltyProgramApi.DevelopersApi buildPrize POST /android-build_prize.php builds prize content
LoyaltyProgramApi.DevelopersApi changeInfo POST /android-modificar_socio.php change user's info.
LoyaltyProgramApi.DevelopersApi changePassword POST /android-modificar_clave.php change password.
LoyaltyProgramApi.DevelopersApi checkUser POST /android-validar_dni.php verifies the user exists
LoyaltyProgramApi.DevelopersApi checkUser2 POST /android-validar_primer_paso.php verifies the user exists
LoyaltyProgramApi.DevelopersApi checkUserMail POST /android-verificar_mail_socio.php verifies the user exists
LoyaltyProgramApi.DevelopersApi contactForm POST /android-enviar_formulario_contacto.php send contact form.
LoyaltyProgramApi.DevelopersApi dettachFMCId POST /gcm_id/desloguear_socio.inc.php associate fcm id
LoyaltyProgramApi.DevelopersApi getCategories POST /android-obtener_rubros.php gets the categories of prizes
LoyaltyProgramApi.DevelopersApi getCities GET /get-cities.php get list of cities.
LoyaltyProgramApi.DevelopersApi getCredits GET /creditos/cmb_creditos.inc.php get credits.
LoyaltyProgramApi.DevelopersApi getCreditsDetails GET /creditos/leer_credito.inc.php get credit details.
LoyaltyProgramApi.DevelopersApi getExchangeTicket POST /android-ticket.php gets user information
LoyaltyProgramApi.DevelopersApi getMiles POST /android-leer_millas.php gets miles
LoyaltyProgramApi.DevelopersApi getMilesDetails POST /android-movimiento_de_millas.php gets miles detail
LoyaltyProgramApi.DevelopersApi getModules GET /android-leer_modulos.php get app configuration.
LoyaltyProgramApi.DevelopersApi getNews POST /noticias/buscar_noticias_etiquetados.inc.php get news for a tagged user
LoyaltyProgramApi.DevelopersApi getNewsDetails POST /noticias/leer_noticia.inc.php get news article details.
LoyaltyProgramApi.DevelopersApi getNewsList POST /noticias/anticipo_noticias.inc.php get news list.
LoyaltyProgramApi.DevelopersApi getNewsWithTag POST /noticias/buscar_noticias_tag.inc.php get news for a tag
LoyaltyProgramApi.DevelopersApi getNewsWithUser POST /noticias/leer_etiquetados_segmentado.inc.php get news for a user
LoyaltyProgramApi.DevelopersApi getPoints POST /android-leer_puntos.php gets user information
LoyaltyProgramApi.DevelopersApi getPointsDetails POST /android-movimiento_de_puntos.php gets user information
LoyaltyProgramApi.DevelopersApi getPrizesFromCategory POST /android-obtener_premios_del_rubro.php get prizes from category
LoyaltyProgramApi.DevelopersApi getProvinces GET /get-provinces.php get list of provinces.
LoyaltyProgramApi.DevelopersApi getRedemptions POST /android-obtener_canjes.php get list of redemptions.
LoyaltyProgramApi.DevelopersApi getSliderImages POST /android-obtener_imagenes_slide.php get slider images
LoyaltyProgramApi.DevelopersApi getSubsidiaries POST /android-sucursales_club.php get subsidiaries
LoyaltyProgramApi.DevelopersApi getSubsidiariesCitymarketing POST /android-obtener_sucursales_citymarketing.php get subsidiaries list details
LoyaltyProgramApi.DevelopersApi getSubsidiariesList POST /android-obtener_sucursales.php get subsidiaries list details
LoyaltyProgramApi.DevelopersApi getSweepstakeDetails POST /concursos/leer_concurso.inc.php get sweepstake details
LoyaltyProgramApi.DevelopersApi getSweepstakes POST /concursos/leer_concursos_vigentes.inc.php get sweepstakes.
LoyaltyProgramApi.DevelopersApi getTagsWithUser POST /noticias/leer_tags_segmentados.inc.php get tag
LoyaltyProgramApi.DevelopersApi getUnreadNews POST /noticias/cantidad_noticias_sin_leer.inc.php get unread news.
LoyaltyProgramApi.DevelopersApi getUserInfo POST /android-socios.php gets user information
LoyaltyProgramApi.DevelopersApi getVouchers GET /android-traer_cupones.php get list of vouchers.
LoyaltyProgramApi.DevelopersApi joinSweepstake POST /concursos/participar_concurso.inc.php join sweepstake
LoyaltyProgramApi.DevelopersApi loginUser POST /android-login.php logs the user in
LoyaltyProgramApi.DevelopersApi prizePaymentDetails POST /android-prize_payment_details.php get payment details for prize
LoyaltyProgramApi.DevelopersApi recoverPassword POST /android-recordatorio_clave.php recover password
LoyaltyProgramApi.DevelopersApi redeemVoucher POST /android-descarga_cupon.php redeem voucher.
LoyaltyProgramApi.DevelopersApi registerFCMId POST /gcm_id/registro_gcm_id.inc.php register fcm id
LoyaltyProgramApi.DevelopersApi registerPrizeVisit POST /android-registrar_visita_premio.php register visit to prize
LoyaltyProgramApi.DevelopersApi registerUser POST /android-alta_socio.php Registers a new user
LoyaltyProgramApi.DevelopersApi reservePrize POST /android-reserva_premio_beneficio.php reserve a prize.
LoyaltyProgramApi.DevelopersApi setUserEmail POST /android-validar_mail.php associates an email address to a user

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.