Skip to content

Commit 304818f

Browse files
Merge pull request #84 from StevenMMortimer/dev
Update documentation and roll back to a dev version (0.2.0.9000)
2 parents 239b5e7 + a898785 commit 304818f

11 files changed

Lines changed: 47 additions & 35 deletions

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: salesforcer
22
Title: An Implementation of 'Salesforce' APIs Using Tidy Principles
3-
Version: 0.2.1
4-
Date: 2020-08-16
3+
Version: 0.2.0.9000
4+
Date: 2020-08-17
55
Description: Functions connecting to the 'Salesforce' Platform APIs (REST, SOAP,
66
Bulk 1.0, Bulk 2.0, Metadata, Reports and Dashboards)
77
<https://trailhead.salesforce.com/en/content/learn/modules/api_basics/api_basics_overview>.

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## salesforcer 0.2.1
1+
## salesforcer 0.2.0.9000
22

33
### Dependencies
44

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ Package features include:
7373
install.packages("salesforcer")
7474
7575
# or get the development version on GitHub
76-
# install.packages("devtools")
77-
devtools::install_github("StevenMMortimer/salesforcer")
76+
# install.packages("remotes")
77+
remotes::install_github("StevenMMortimer/salesforcer")
7878
```
7979

8080
If you encounter an issue while using this package, please file a minimal reproducible

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ Package features include:
7373
install.packages("salesforcer")
7474

7575
# or get the development version on GitHub
76-
# install.packages("devtools")
77-
devtools::install_github("StevenMMortimer/salesforcer")
76+
# install.packages("remotes")
77+
remotes::install_github("StevenMMortimer/salesforcer")
7878
```
7979

8080
If you encounter an issue while using this package, please file a

index.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Package features include:
7474
install.packages("salesforcer")
7575
7676
# or get the development version on GitHub
77-
# install.packages("devtools")
78-
devtools::install_github("StevenMMortimer/salesforcer")
77+
# install.packages("remotes")
78+
remotes::install_github("StevenMMortimer/salesforcer")
7979
```
8080

8181
If you encounter an issue while using this package, please file a minimal reproducible

index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Package features include:
7474
install.packages("salesforcer")
7575

7676
# or get the development version on GitHub
77-
# install.packages("devtools")
78-
devtools::install_github("StevenMMortimer/salesforcer")
77+
# install.packages("remotes")
78+
remotes::install_github("StevenMMortimer/salesforcer")
7979
```
8080

8181
If you encounter an issue while using this package, please file a

vignettes/getting-started.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ sf_auth(username = username,
5050
```
5151

5252
```{r load-package, eval=FALSE}
53-
suppressWarnings(suppressMessages(library(dplyr)))
53+
library(dplyr, warn.conflicts = FALSE)
5454
library(salesforcer)
5555
sf_auth()
5656
```

vignettes/passing-control-args.Rmd

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ functions you're already familiar with.
3535

3636
This new feature can be seen in the `sf_create` (and many other functions) as
3737
`control=list(...)`. The dots mean that you can pass any number of controls directly
38-
into the function. For example, the following code will create a record, but prevent
39-
its creation from showing up in the Chatter feeds by setting the `DisableFeedTrackingHeader`.
38+
into the function.
4039

4140
```{r auth, include = FALSE}
4241
library(salesforcer)
@@ -50,6 +49,17 @@ sf_auth(username = username,
5049
security_token = security_token)
5150
```
5251

52+
First, authenticate and load any required packages for your analysis.
53+
54+
```{r load-package, eval=FALSE}
55+
library(salesforcer)
56+
sf_auth()
57+
```
58+
59+
In the example below, we demonstrate how to create a record, but use the control
60+
arguments to prevent its creation from showing up in the Chatter feeds by setting
61+
the `DisableFeedTrackingHeader`.
62+
5363
```{r sample-create}
5464
new_contact <- c(FirstName = "Jenny",
5565
LastName = "Williams",
@@ -60,23 +70,25 @@ record1 <- sf_create(new_contact,
6070
record1
6171
```
6272

63-
You will notice that the argument `DisableFeedTrackingHeader` can be included right into
64-
the function without any documentation existing for it in the `sf_create` function.
65-
This is because the dots (`...`) allow you to pass over a dozen different control
66-
parameters and that documentation would be tedious to create and maintain over multiple
67-
functions in the package. However, you will notice in the documentation entry for
68-
the `control` argument there is a link to a function called `sf_control` which you
69-
can use to directly to pass into `control` or simply to review its documentation of all the
70-
possible control parameters and their defaults. This is where you can review the various
71-
control options in more detail before trying to set them.
72-
73-
You may have also noticed that the argument <a href="https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_header_disablefeedtracking.htm" rel="noopener noreferrer" target="_blank">DisableFeedTrackingHeader</a> was formatted
74-
as a list with an element inside called `disableFeedTracking` set to `TRUE`. This may
75-
seem redundant but there are two reasons for this. First, this is exactly how the
76-
Salesforce APIs documents these options, which are typically referred to as "headers"
77-
because they are passed as a named header of the HTTP request and then the header fields
78-
and values are provided for that header. Second, some headers have multiple fields and values
79-
so a list is the only way to provide multiple named fields and values under a single header entity.
73+
You will notice that the argument `DisableFeedTrackingHeader` can be included
74+
right into the function without any documentation existing for it in the
75+
`sf_create` function. This is because the dots (`...`) allow you to pass over a
76+
dozen different control parameters and that documentation would be tedious to
77+
create and maintain over multiple functions in the package. However, you will
78+
notice in the documentation entry for the `control` argument there is a link to
79+
a function called `sf_control` which you can use to directly to pass into
80+
`control` or simply to review its documentation of all the possible control
81+
parameters and their defaults. This is where you can review the various control
82+
options in more detail before trying to set them.
83+
84+
You may have also noticed that the argument <a href="https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_header_disablefeedtracking.htm" rel="noopener noreferrer" target="_blank">DisableFeedTrackingHeader</a> was
85+
formatted as a list with an element inside called `disableFeedTracking` set to
86+
`TRUE`. This may seem redundant but there are two reasons for this. First, this
87+
is exactly how the Salesforce APIs documents these options, which are typically
88+
referred to as "headers" because they are passed as a named header of the HTTP
89+
request and then the header fields and values are provided for that header.
90+
Second, some headers have multiple fields and values so a list is the only way
91+
to provide multiple named fields and values under a single header entity.
8092

8193
## An example using the `DuplicateRuleHeader`
8294

vignettes/working-with-attachments.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sf_auth(username = username,
4545
```
4646

4747
```{r load-package, eval=FALSE}
48-
library(dplyr)
48+
library(dplyr, warn.conflicts = FALSE)
4949
library(salesforcer)
5050
sf_auth()
5151
```

vignettes/working-with-bulk-apis.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sf_auth(username = username,
4242
```
4343

4444
```{r load-package, eval=FALSE}
45-
suppressWarnings(suppressMessages(library(dplyr)))
45+
library(dplyr, warn.conflicts = FALSE)
4646
library(salesforcer)
4747
sf_auth()
4848
```

0 commit comments

Comments
 (0)