format_uri_keystage: Format keystage query for dfe-api

Description Usage Arguments Details Value Examples

View source: R/format_uri_keystage.R

Description

format_uri_keystage formats a queri uri string ready for submission to dfe-api.

Usage

1
2
format_uri_keystage(stage = NULL, filter = NULL, order = NULL,
  skip = NULL, take = NULL)

Arguments

stage

Keystage of interest: takes either 'ks2', 'ks4', or 'ks5'. deafults to 'NULL'.

skip

Takes an integer; these many records will be skipped over and no returns.

take

How many records to return. Although the default in this function is 'NULL', the serverside default is 50.

Details

Takes a properly formatted uri string as input, and makes a request of dfe-api, parses the returning JSON, and returns a list.

Value

A properly formatted uri string for querying the API, for example: 'http://dfe-api.azurewebsites.net/api/keystage/search/ks4?'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

library(dfeAPI)
library(dplyr)

 # Try basic functionality

format_uri_keystage(
   stage = "ks4",
   take = 10
) %>%
   get_data


## End(Not run)

ivyleavedtoadflax/dfeAPI documentation built on May 18, 2019, 7:13 a.m.