Learn R Programming

glassdoor (version 0.8.1)

gd_api: General Glassdoor API function

Description

General Glassdoor API function

Usage

gd_api(query = NULL, action = NULL, agent = gd_user_agent(),
  version = 1, format = "json", url = gd_url(), pid = gd_pid(),
  pat = gd_pat(), ip_address = NULL, add_query = NULL, ...)

Arguments

query

Additional options to pass to the query other than those specified here

action

The particular API call that you would like to make

agent

The User-Agent (browser) of the end user to whom the API results will be shown. Note that you can can obtain this from the "User-Agent" HTTP request header from the end-user

version

The API version. The current version is 1 except for jobs, which is currently version 1.1

format

Either xml or json as you prefer

url

Glassdoor RESTful API URL

pid

Your partner id, as assigned by Glassdoor

pat

Your partner key, as assigned by Glassdoor

ip_address

The IP address of the end user to whom the API results will be shown

add_query

Additional options to pass to the query other than those specified here (named list)

...

Additional options to send to GET

Value

A list of class gd_api

Examples

Run this code
# NOT RUN {
if (have_gd_pid() && have_gd_pat()) {
res = gd_api(
action = "employers",
other = NULL,
  version = 1,
format = "json",
query =  "pharmaceuticals")

res = gd_api(
action = "employers",
other = NULL,
 version = 1,
format = "json",
query = "pharmaceuticals", config = list())
}
# }

Run the code above in your browser using DataLab