Shopify SDK for Unity
Public Member Functions | Properties | List of all members
Shopify.Unity.SDK.BaseLoader Class Referenceabstract

An abstract base that must be defined by classes that will perform network communication. More...

Inheritance diagram for Shopify.Unity.SDK.BaseLoader:
Shopify.Unity.SDK.Editor.UnityEditorLoader Shopify.Unity.SDK.UnityLoader

Public Member Functions

 BaseLoader (string domain, string accessToken, string locale=null)
 
abstract void Load (string query, LoaderResponseHandler callback)
 Sends the GraphQL query to the GraphQL endpoint. More...
 
abstract void SetHeader (string key, string value)
 Assigns a custom header field to the loader. More...
 
abstract string SDKVariantName ()
 Returns the loader's X-SDK-Variant header value. Required by a BaseLoader implementation to let the server know who is sending the request. More...
 

Properties

string Domain [get]
 Domain of a Shopify store. More...
 
string AccessToken [get]
 Access token used to communicate with a Shopify store. More...
 
string Locale [get]
 Locale for translated content of supported types and fields. More...
 

Detailed Description

An abstract base that must be defined by classes that will perform network communication.

Member Function Documentation

◆ Load()

abstract void Shopify.Unity.SDK.BaseLoader.Load ( string  query,
LoaderResponseHandler  callback 
)
pure virtual

Sends the GraphQL query to the GraphQL endpoint.

Parameters
querya GraphQL query
callbacka callback which will receive a response from the GraphQL query

Implemented in Shopify.Unity.SDK.UnityLoader, and Shopify.Unity.SDK.Editor.UnityEditorLoader.

◆ SDKVariantName()

abstract string Shopify.Unity.SDK.BaseLoader.SDKVariantName ( )
pure virtual

Returns the loader's X-SDK-Variant header value. Required by a BaseLoader implementation to let the server know who is sending the request.

Returns
Identifying name of the loader to be sent to the server using the X-SDK-Variant header.

Implemented in Shopify.Unity.SDK.UnityLoader, and Shopify.Unity.SDK.Editor.UnityEditorLoader.

◆ SetHeader()

abstract void Shopify.Unity.SDK.BaseLoader.SetHeader ( string  key,
string  value 
)
pure virtual

Assigns a custom header field to the loader.

Parameters
keyHeader field name
valueHeader field value

Implemented in Shopify.Unity.SDK.UnityLoader, and Shopify.Unity.SDK.Editor.UnityEditorLoader.

Property Documentation

◆ AccessToken

string Shopify.Unity.SDK.BaseLoader.AccessToken
get

Access token used to communicate with a Shopify store.

◆ Domain

string Shopify.Unity.SDK.BaseLoader.Domain
get

Domain of a Shopify store.

◆ Locale

string Shopify.Unity.SDK.BaseLoader.Locale
get

Locale for translated content of supported types and fields.


The documentation for this class was generated from the following file: