very simple query formulation, build queries using endpoints of bhklab PharmacoDB API — rxdbQuery_v1 • pogos

# very simple query formulation, build queries using endpoints of bhklab PharmacoDB API

Source: `R/rxdbHandling.R`
`rxdbQuery_v1.Rd`

very simple query formulation, build queries using endpoints of bhklab PharmacoDB API

    rxdbQuery_v1(
      ...,
      url = "https://pharmacodb.pmgenomics.ca/api/v1/",
      decoder = basicDecoder
    )

## Arguments

...

  typically a string representing an API endpoint, will be processed by unlist() and then to paste0 preceded by `url`

url

  of a PharmacoDB server API target

decoder

  a function of one argument that will be applied to API response (typically JSON)

## Value

typically a list, dependent on decoder parameter

## Examples

    qout = rxdbQuery_v1('cell_lines') # yields 30; append '?all=true' to retrieve all
    unlist(lapply(qout, function(x) x[[2]]))
    #>  [1] "105KC"    "1321N1"   "143B"     "184A1"    "184B5"    "2004"
    #>  [7] "201T"     "21MT1"    "21MT2"    "21NT"     "21PT"     "22RV1"
    #> [13] "23132-87" "253J"     "253J-BV"  "42-MG-BA" "451Lu"    "501A"
    #> [19] "537 MEL"  "5637"     "59M"      "600MPE"   "624 mel"  "639-V"
    #> [25] "647-V"    "697"      "769-P"    "786-0"    "8-MG-BA"  "8305C"