/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Shop API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 20.4
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient'
import Site from '../models/Site'
/**
* Site service.
* @module api/SiteApi
* @version 20.4
*/
export default class SiteApi {
/**
* Constructs a new SiteApi.
* @alias module:api/SiteApi
* @class
* @param {module:ApiClient} apiClient Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance
}
/**
* Access site information, like site status and site content URLs.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:models/Site} and HTTP response
*/
getSiteWithHttpInfo() {
const postBody = null
const pathParams = {
}
const queryParams = {
}
const headerParams = {
}
const formParams = {
}
const authNames = ['client_id', 'customers_auth']
const contentTypes = ['application/json', 'text/xml', 'application/xml']
const accepts = ['application/json', 'text/xml', 'application/xml']
const returnType = Site
return this.apiClient.callApi(
'/site', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
)
}
/**
* Access site information, like site status and site content URLs.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:models/Site}
*/
getSite() {
return this.getSiteWithHttpInfo()
.then((response_and_data) => {
return response_and_data.data
})
}
}