makeJson: Function to construct JSON body request to pass in for the...

Description Usage Arguments Value Author(s) Examples

View source: R/makeJson.R

Description

Function to construct JSON body request to pass in for the Search API of the Crunchbase API

Usage

1
2
3
4
5
6
7
8
makeJson(
  query,
  order_by = "identifier",
  sort_direction = "asc",
  limit = 1000L,
  before_id = "",
  after_id = ""
)

Arguments

query

JSON of query conditions, each can be individuall constructed with the predicate function

order_by

Field name by which the response should be ordered

sort_direction

Order direction, either "asc" for ascending or "desc" for descending. The default is "asc"

limit

Number of rows to be returned, default 100, max 2000, min 1

before_id

For paginating through responses, use this to go back to the entries before this uuid

after_id

For paginating through responses, use this to go forward to the entries after uuid

Value

an list object that can be passed in as the JSON body parameter in the Search API call once converted to JSON

Author(s)

Layla Rohkohl, byehity@gmail.com

Examples

1
2
3
4
5
make_query(fields = "founded_on,locations",
order_by = "founded_on",
sort_direction = "desc",
query = q,
limit = 200)

Lyrohk/cruncher documentation built on Dec. 17, 2021, 1:17 a.m.