simple_review_api

1.0.12 • Public • Published

simple_review_api

SimpleReviewApi - JavaScript client for simple_review_api This is a simple review API This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.12
  • Package version: 1.0.12
  • 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 simple_review_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 simple_review_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

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

    npm install YOUR_USERNAME/simple_review_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 SimpleReviewApi = require('simple_review_api');

var api = new SimpleReviewApi.ImagesApi()

var imageId = "imageId_example"; // {String} id of an image to delete


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

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/reviews

Class Method HTTP request Description
SimpleReviewApi.ImagesApi deleteImageById DELETE /images/{imageId} delete an image by id
SimpleReviewApi.ImagesApi getImageById GET /images/{imageId} get image by id
SimpleReviewApi.ImagesApi uploadImage POST /images upload an image
SimpleReviewApi.PropertiesApi getPropertyReview GET /properties/ratings calculates summary ratings for a property
SimpleReviewApi.RatingsApi getRatings GET /ratings get all ratings
SimpleReviewApi.ReviewsApi addComment POST /reviews/{reviewId}/comments add a comment to a review
SimpleReviewApi.ReviewsApi addReview POST /reviews add review
SimpleReviewApi.ReviewsApi deleteComment DELETE /reviews/{reviewId}/comments/{commentId} deletes a comment
SimpleReviewApi.ReviewsApi getAllComments GET /reviews/{reviewId}/comments retrieves all comments for a review
SimpleReviewApi.ReviewsApi getCommentById GET /reviews/{reviewId}/comments/{commentId} get comment by id
SimpleReviewApi.ReviewsApi getReviewById GET /reviews/{reviewId} retrieves a review by id
SimpleReviewApi.ReviewsApi replaceComment PUT /reviews/{reviewId}/comments/{commentId} replaces a comment
SimpleReviewApi.ReviewsApi replaceReview PUT /reviews/{reviewId} replaces a review
SimpleReviewApi.ReviewsApi searchReview GET /reviews searches reviews
SimpleReviewApi.UsersApi addUser POST /users create an user or updates an existing one
SimpleReviewApi.UsersApi getUserById GET /users/{userId} get user by id
SimpleReviewApi.UsersApi replaceUser PUT /users/{userId} replaces existing user with new one
SimpleReviewApi.UsersApi searchUsers GET /users searches for users using search criteria (atm get all users)

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Readme

Keywords

none

Package Sidebar

Install

npm i simple_review_api

Weekly Downloads

0

Version

1.0.12

License

Apache 2.0

Unpacked Size

202 kB

Total Files

71

Last publish

Collaborators

  • dmitrymelnik