updateObject: Update any object

Description Usage Arguments Details Author(s) See Also Examples

Description

Update any object, see details and example.

Usage

1
updateObject(object, body, id)

Arguments

object

Object to be updated, see details for valid values.

body

Body of request that includes campaigns settings. See examples.

id

id of object to update

Details

Valid values for object:

upodateObject can essentially replace any other update family functions. See examples.

Author(s)

John Coene jcoenep@gmail.com

See Also

orionOAuth, updateAudience, updateCampaign, updateAdset, updateAd and helpers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# authenticate
orionOAuth(client.id = 0000,
           client.secret = "0x00000000x00x0x000xxx0000x0xx0")

# list current adsets
adsets <- listAdsets()

# new settings                       
settings <- list(switch = switchIt("on"), name = "New Adset Name")

# update adset
update <- updateObject(object = "adset", adset.id = adsets$id[1], 
                       body = settings)

# equivalent to
# update <- updateAdset(adset.id = adsets$id[1], body = settings)

# fetch updated list
adsets <- listAdsets()

## End(Not run)

JohnCoene/oRion documentation built on June 13, 2019, 12:44 p.m.