Home Identifier Source Repository
public class | source

Session

Extends:

Base → Session

The Session resource

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

actions: *

public get

Method Summary

Public Methods
public

init(domain: string, token: string)

Dispatches the SET_SESSION event to the store

Inherited Summary

From class Base
public get

Returns an object that supplies the clear, count and merge actions for this resource

public get

An array of methods to be exposed via APIProxy

public

clear()

Dispatches the clear action for this resource.

public

create(resource: object, options: object): RequestPromise

Performs a POST request, sending the resource along as the request body

public

Destroys the resource

public

Performs a GET request for the specified query.

public

Performs a GET request for the resource's count endpoint

public

update(id: number | string, resource: object, options: object): RequestPromise

Updates the given resource

protected

Public Constructors

public constructor source

Override:

Base#constructor

Public Members

public get actions: * source

Override:

Base#actions

public get apiMethods: Array<string>: * source

Override:

Base#apiMethods

Return:

Array<string>

The names of all methods to be made available

Public Methods

public init(domain: string, token: string) source

Dispatches the SET_SESSION event to the store

Params:

NameTypeAttributeDescription
domain string

The shop's domain (with or without the .myshopify.com suffix)

token string

The API token to be used