eGET: Etsy HTTP wrappers

Description Usage Arguments Details Value Functions See Also Examples

View source: R/wrappers.etsy.R

Description

Generic wrappers to the HTTP methods used in the etsy API

Usage

1
2
3
4
5
eGET(methodName, accessToken = NULL, debugMode = FALSE, ...)

ePUT(methodName, body, accessToken, debugMode = FALSE, ...)

ePOST(methodName, body, accessToken, debugMode = FALSE, ...)

Arguments

methodName

Name of the etsy API method to use

accessToken

An Auth1.0 token with the required authorization scope for methodName

debugMode

Logical flag, default value FALSE. When TRUE, the GET call is made verbose and the value returned includes details on the content and the response

...

In eGET, named list of the query parameters to be passed on to the GET call. When a etsy API method uri contains a parameter, this is also passed as a query parameter to eGET In ePUT and ePOST, ... is passed on to the PUT/POST httr methods, and thus added to config()

Details

eGET

Value

eGET returns the response of methodName, parsed into a data.frame. When debugMode = TRUE, the returned value is a list containing:

Functions

See Also

[etsy.access_token()]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
allActiveListings <- eGET("findAllListingActive")
myShopActiveListings <- eGET("findAllShopListingsActive", shop_id = etsy$shop_id, limit = 100)
myReceipts <- eGET("findAllShopReceipts", token = etsy.access_token("transactions_r"), shop_id = etsy$shop_id)
ePUT("updateListing", accessToken = etsy.access_token("listings_w"), listing_id = 757810862, debugMode = TRUE, body = list(state = "inactive"))
ePOST("createListing", 
       body = list(quantity = 1, 
                   title = "test title", 
                   description = "test description", 
                   price = 1, 
                   who_made = "i_did", 
                   is_supply = "false", 
                   when_made = "made_to_order", 
                   shipping_template_id = "27897639858"), 
       accessToken = etsy.access_token("listings_w"))

agpknitweardesign/festotuAPIs documentation built on Feb. 2, 2020, 12:20 p.m.