1.0.12 • Published 5 years ago

simple_review_api v1.0.12

Weekly downloads
1
License
Apache 2.0
Repository
-
Last release
5 years ago

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

ClassMethodHTTP requestDescription
SimpleReviewApi.ImagesApideleteImageByIdDELETE /images/{imageId}delete an image by id
SimpleReviewApi.ImagesApigetImageByIdGET /images/{imageId}get image by id
SimpleReviewApi.ImagesApiuploadImagePOST /imagesupload an image
SimpleReviewApi.PropertiesApigetPropertyReviewGET /properties/ratingscalculates summary ratings for a property
SimpleReviewApi.RatingsApigetRatingsGET /ratingsget all ratings
SimpleReviewApi.ReviewsApiaddCommentPOST /reviews/{reviewId}/commentsadd a comment to a review
SimpleReviewApi.ReviewsApiaddReviewPOST /reviewsadd review
SimpleReviewApi.ReviewsApideleteCommentDELETE /reviews/{reviewId}/comments/{commentId}deletes a comment
SimpleReviewApi.ReviewsApigetAllCommentsGET /reviews/{reviewId}/commentsretrieves all comments for a review
SimpleReviewApi.ReviewsApigetCommentByIdGET /reviews/{reviewId}/comments/{commentId}get comment by id
SimpleReviewApi.ReviewsApigetReviewByIdGET /reviews/{reviewId}retrieves a review by id
SimpleReviewApi.ReviewsApireplaceCommentPUT /reviews/{reviewId}/comments/{commentId}replaces a comment
SimpleReviewApi.ReviewsApireplaceReviewPUT /reviews/{reviewId}replaces a review
SimpleReviewApi.ReviewsApisearchReviewGET /reviewssearches reviews
SimpleReviewApi.UsersApiaddUserPOST /userscreate an user or updates an existing one
SimpleReviewApi.UsersApigetUserByIdGET /users/{userId}get user by id
SimpleReviewApi.UsersApireplaceUserPUT /users/{userId}replaces existing user with new one
SimpleReviewApi.UsersApisearchUsersGET /userssearches for users using search criteria (atm get all users)

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

1.0.12

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago