-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
86 lines (62 loc) · 2.41 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output:
md_document:
variant: gfm
---
[![CRAN Status](http://r-pkg.org/badges/version/icesConnect)](https://cran.r-project.org/package=icesConnect)
[![CRAN Monthly](http://cranlogs.r-pkg.org/badges/icesConnect)](https://cran.r-project.org/package=icesConnect)
[![CRAN Total](http://cranlogs.r-pkg.org/badges/grand-total/icesConnect)](https://cran.r-project.org/package=icesConnect)
[![License](https://img.shields.io/badge/license-GPL%20(%3E%3D%202)-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[<img align="right" alt="ICES Logo" width="17%" height="17%" src="http://ices.dk/_layouts/15/1033/images/icesimg/iceslogo.png">](http://ices.dk)
### icesConnect
icesConnect provides GET, POST and PUT functions for users whishing to
connect to ICES web services. The package provides the option to use
tokens for ICES web services that require authentication and authorization.
The token can be fetched using the users, username and password, or
by setting the token manually.
icesConnect is implemented as an [R](https://www.r-project.org) package and
available on [CRAN](https://cran.r-project.org/package=icesConnect).
### Installation
icesConnect can be installed from CRAN using the `install.packages` command:
```r
install.packages("icesConnect")
```
### Usage
For a summary of the package:
```r
library(icesConnect)
?icesConnect
```
### Examples
```{r, echo = FALSE}
library(icesConnect)
```
To perform a normal get request:
```{r}
ices_get_jwt("https://taf.ices.dk/vms/api/gearwidths", jwt = "")
```
To perform a get request using a token, it is recommended to set your
username first.
```{r, eval = FALSE}
ices_get_jwt("https://taf.ices.dk/vms/api/gearwidths")
```
The first time this function is called, or if the curretnly stored
token has expired the user will be asked to enter thier password.
This password is the password use to access ICES resources, such as
the ICES sharepoint.
### Development
icesConnect is developed openly on
[GitHub](https://github.com/ices-tools-prod/icesConnect).
Feel free to open an [issue](https://github.com/ices-tools-prod/icesConnect/issues)
there if you encounter problems or have suggestions for future versions.
The current development version can be installed using:
```R
# Download and install icesConnect in R
install.packages(
"icesConnect",
repos = c(
icestoolsprod = "https://ices-tools-prod.r-universe.dev",
CRAN = "https://cloud.r-project.org"
)
)
```