README.md

R API client for petstore

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI spec from a remote server, you can easily generate an API client.

Installation

Prerequisites

Install the dependencies

install.packages("jsonlite")
install.packages("httr")
install.packages("base64enc")

Build the package

git clone https://github.com/GIT_USER_ID/GIT_REPO_ID
cd GIT_REPO_ID
R CMD build .
R CMD check petstore_1.0.0.tar.gz --no-manual
R CMD INSTALL petstore_1.0.0.tar.gz

Install the package

install.packages("petstore")

To install directly from Github, use devtools:

install.packages("devtools")
library(devtools)
install_github("GIT_USER_ID/GIT_REPO_ID")

Usage

library(petstore)

Documentation for API Endpoints

All URIs are relative to http://petstore.swagger.io/v2

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- PetApi | AddPet | POST /pet | Add a new pet to the store PetApi | DeletePet | DELETE /pet/{petId} | Deletes a pet PetApi | FindPetsByStatus | GET /pet/findByStatus | Finds Pets by status PetApi | FindPetsByTags | GET /pet/findByTags | Finds Pets by tags PetApi | GetPetById | GET /pet/{petId} | Find pet by ID PetApi | UpdatePet | PUT /pet | Update an existing pet PetApi | UpdatePetWithForm | POST /pet/{petId} | Updates a pet in the store with form data PetApi | UploadFile | POST /pet/{petId}/uploadImage | uploads an image StoreApi | DeleteOrder | DELETE /store/order/{orderId} | Delete purchase order by ID StoreApi | GetInventory | GET /store/inventory | Returns pet inventories by status StoreApi | GetOrderById | GET /store/order/{orderId} | Find purchase order by ID StoreApi | PlaceOrder | POST /store/order | Place an order for a pet UserApi | CreateUser | POST /user | Create user UserApi | CreateUsersWithArrayInput | POST /user/createWithArray | Creates list of users with given input array UserApi | CreateUsersWithListInput | POST /user/createWithList | Creates list of users with given input array UserApi | DeleteUser | DELETE /user/{username} | Delete user UserApi | GetUserByName | GET /user/{username} | Get user by user name UserApi | LoginUser | GET /user/login | Logs user into the system UserApi | LogoutUser | GET /user/logout | Logs out current logged in user session UserApi | UpdateUser | PUT /user/{username} | Updated user

Documentation for Models

Documentation for Authorization

api_key

petstore_auth

Author



wing328/petstore-r-client documentation built on June 2, 2022, 10:24 a.m.