options

package
v0.0.0-...-3a21483 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const DefaultAPIPrefix = "/wc-api/"

DefaultAPIPrefix ...

View Source
const DefaultUserAgent string = "WooCommerce API Client-Go"

DefaultUserAgent ... No version number.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced struct {
	WPAPI           bool   // Allow make requests to the new WP REST API integration
	WPAPIPrefix     string // Custom WP REST API URL prefix
	Version         string // API version, default is v3
	Timeout         int    // Request timeout, default is 15
	FollowRedirects bool   // Allow the API call to follow redirects

	VerifySsl       bool   // Verify SSL when connect
	QueryStringAuth bool   // Force Basic Authentication
	OAuthTimestamp  string // Custom oAuth timestamp
	UserAgent       string // Custom user-agent
	// contains filtered or unexported fields
}

Advanced options of WooCommerce API Client

type Basic

type Basic struct {
	URL     string   // Store URL
	Key     string   // API Consumer Key
	Secret  string   // API Consumer Secret
	Options Advanced // Advanced Options (see below)
}

Basic options of WooCommerce API Client

func (*Basic) DisableSslVerification

func (o *Basic) DisableSslVerification()

DisableSslVerification in case of debug

func (*Basic) FollowRedirects

func (o *Basic) FollowRedirects() bool

FollowRedirects during requests

func (*Basic) OAuthTimestamp

func (o *Basic) OAuthTimestamp() string

OAuthTimestamp return OAuth specific timestamp

func (*Basic) QueryStringAuth

func (o *Basic) QueryStringAuth() bool

QueryStringAuth returns true when credentials will pass through query string

func (*Basic) Timeout

func (o *Basic) Timeout() int

Timeout per request to WooCommerce API

func (*Basic) UserAgent

func (o *Basic) UserAgent() string

UserAgent which will be use for requests

func (*Basic) VerifySsl

func (o *Basic) VerifySsl() bool

VerifySsl return requirement of SSL certificate check

func (*Basic) Version

func (o *Basic) Version() string

Version of WooCommerce API which will be used

func (*Basic) WPAPI

func (o *Basic) WPAPI() bool

WPAPI returns if used WordPress API or not

func (*Basic) WPAPIPrefix

func (o *Basic) WPAPIPrefix() string

WPAPIPrefix is a prefix for WordPress API requests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL