The odesk Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The odesk Reference Manual

This is the odesk Reference Manual, version 0.3.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:52:22 2022 GMT+0.

Table of Contents


1 Introduction

=========================
What is cl-odesk?
=========================
This is cl-odesk, an implementation of the oDesk API in Common Lisp.

Spec URI: http://developers.odesk.com

=========================
Example Usage
=========================

If you already installed cl-odesk you can load it by::

 (require :odesk)

Before doing some API calls first you need to define connection. You will need PUBLIC_KEY, PRIVATE_KEY and TOKEN. The last one you can get only by authenticating yourself in your favourite web browser. Please read API Documentation at http://developers.odesk.com

You can create connection by instantiating API class::

 (defparameter *test-connection*
   (make-instance 'odesk:api-json
                  :public-key "PUBLIC"
                  :secret-key "SECRET"
                  :api-token "TOKEN"))

Here is macro that can ease your life a lot::

 (with-odesk (:connection con
              :public-key "PUBLIC"
              :secret-key "SECRET"
              :api-token "TOKEN")
   (print con))

And another macro that can help too::

 (connect-odesk (:public-key "PUBLIC"
                 :secret-key "SECRET"
                 :api-token "TOKEN"))

Now let's do request to get info about user.
If you went first way and created variable *test-connection*::

 (odesk:hr/get-user :connection *test-connection*)

If you go the second way and will use with-odesk macro. Here you have two options. The first one::

 (odesk:with-odesk
     (:connection my-con
      :public-key "PUBLIC"
      :secret-key "SECRET"
      :api-token "TOKEN")
   (odesk:hr/get-user :connection my-con))

The second::

 (odesk:with-odesk
     (:public-key "PUBLIC"
      :secret-key "SECRET"
      :api-token "TOKEN")
   (odesk:hr/get-user))

Third way is for those who want to create connection globally and then use it in the code with-out the need to use with-odesk macro::

 (odesk:connect-odesk (:public-key "PUBLIC"
                       :secret-key "SECRET"
                       :api-token "TOKEN"))
 (odesk:hr/get-user)

=========================
Supported API Calls
=========================

Authentication via Token
-----------------
* Get Token::

  auth/get-token (tested)

* Get frob::

  auth/get-frob (not tested)

* Check token::

  auth/check-token (tested)

* Revoke Session::

  auth/revoke-token (tested)

Authentication via OAuth
-----------------
no support at all.

URL Shortening
--------------

* Shorten URL::

  shorturl/get-shorten (tested)

* Expand URL::

  shorturl/get-expand (tested)

Financial Reporting
-----------------
* Generate Billing Reports for a Specific Provider::

  no support

* Generate Billing Reports for a Specific Provider's Team::

  no support

* Generate Billing Reports for a Specific Provider's Company::

  no support

* Generate Earning Reports for a Specific Provider::

  no support

* Generate Earning Reports for a Specific Provider's Team::

  no support

* Generate Earning Reports for a Specific Provider's Company::

  no support

* Generate Billing Reports for a Specific Buyer's Team::

  no support

* Generate Billing Reports for a Specific Buyer's Company::

  no support

* Generate Earning Reports for a Specific Buyer's Team::

  no support

* Generate Earning Reports for a Specific Buyer's Company::

  no support

* Generate Financial Reports for a Specific Account::

  no support

* Generate Financial Reports for an owned Account::

  no support

Custom Payments
-----------------

* Custom Payment::

  no support

Hiring. User Roles
-----------------

* User Roles::

  no support

* Referenced user::

  hr/get-user (tested)

Hiring. Jobs HR API
-----------------

* Returns all jobs that a user has manage_recruiting accesss to::

  no support

* Get Job by reference::

  no support

* Post a Job::

  no support

* Update Job::

  no support

* Cancel the Job::

  no support

Hirigin. Offers API
-----------------

* Lists all the offers on a specific job or within a specific team::

  no support

* Get Offer::

  no support

Hiring. Engagements API
-----------------

* Return engagement(s) based on the parameters supplied in the API call::

  no support

* Get Engagement::

  no support

Message Center
-----------------

* Retrieve a list of all active trays and a message count for each::

  mc/get-trays (tested)

* Retrieve tray contents::

  mc/list-tray (tested)

* List thread details based on thread id::

  no support

* Update threads based on user actions::

  no support

* Send a message to a user::

  no support

oConomy Reports API
-----------------

* Generate Monthly oDesk job market report::

  no support

* Generate Hours worked by location report::

  no support

* Generate oConomy weekly growth report::

  no support

* Generate Top countries by hours worked for last 30 days report::

  no support

* Generate Earnings by category report::

  no support

* Generate Monthly most requested skills report::

  no support

Organization
-----------------

* User Information::

  hr/get-myself (tested)

* Company Information::

  hr/get-companies (tested)

  hr/get-company (not tested)

  hr/get-company-teams (tested)

  hr/get-company-users (not tested)

* Team Information::

  hr/get-teams (tested)

  hr/get-team-users (not tested)

Provider Profile
-----------------

* Provider Information::

  profiles/get-provider (tested)

  profiles/get-provider-brief (tested)

Search Jobs
-----------------

* Searching Jobs::

  profiles/get-jobs (tested)

Search Providers
-----------------

* Searching Providers::

  profiles/get-providers (tested)

Snapshot
-----------------

* Get Snapshot::

  no support

* Update Snapshot Memo::

  no support

* Delete Snapshot::

  no support

oTasks
-----------------

* List all Tasks within a Company, Team or User::

  no support

* List all oTask records within a Company, Team or User::

  no support

* Return a specific task record within a company, team or user::

  no support

* Create an oTask record within a company, team or user::

  no support

* Update an oTask record within a company, team or user::

  no support

* Delete an oTask record within a company, team or user::

  no support

* Delete All oTask records within a company, team or user::

  no support

* Update a group of oTask records within a company, team or user::

  no support

Team
-----------------
* Get Team Rooms::

  team/get-teamrooms (tested)

* Get Team Room::

  team/get-teamroom (tested)

Work Diary
-----------------
* Get Work Diary::

  team/get-workdiary (tested)

Time Reports
-----------------
* Generate Time Reports for a Specific Team::

  timereports/get-team (tested)

* Generating Company Wide Reports::

  timereports/get-company (tested)

* Generating Agency Specific Reports::

  timereports/get-agency (tested)

* Generating Provider Specific Reports::

  timereports/get-provider (tested)





2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 odesk

Common Lisp bindings for oDesk API

Author

Dmitriy Budashny <dmitriy.budashny@gmail.com>

License

BSD

Version

0.3.1

Dependencies
  • iterate (system).
  • md5 (system).
  • drakma (system).
  • split-sequence (system).
  • cl-ppcre (system).
  • alexandria (system).
Source

odesk.asd.

Child Component

src (module).


Next: , Previous: , Up: The odesk Reference Manual   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 odesk/src

Source

odesk.asd.

Parent Component

odesk (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

4.1.1 odesk/odesk.asd

Source

odesk.asd.

Parent Component

odesk (system).

ASDF Systems

odesk.

Packages

odesk-api-asd.

Public Interface

*odesk-version-string* (special variable).


4.1.2 odesk/src/packages.lisp

Source

odesk.asd.

Parent Component

src (module).

Packages

odesk.


4.1.3 odesk/src/parameters.lisp

Dependency

packages.lisp (file).

Source

odesk.asd.

Parent Component

src (module).

Public Interface

*connection* (special variable).

Internals

4.1.4 odesk/src/utils.lisp

Dependency

parameters.lisp (file).

Source

odesk.asd.

Parent Component

src (module).

Internals

4.1.5 odesk/src/odesk.lisp

Dependency

utils.lisp (file).

Source

odesk.asd.

Parent Component

src (module).

Public Interface
Internals

Previous: , Up: Lisp   [Contents][Index]

4.1.6 odesk/src/requests.lisp

Dependency

odesk.lisp (file).

Source

odesk.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 odesk-api-asd

Source

odesk.asd.

Use List
  • asdf/interface.
  • common-lisp.
Public Interface

*odesk-version-string* (special variable).


Previous: , Up: Packages   [Contents][Index]

5.2 odesk

Source

packages.lisp.

Use List
  • common-lisp.
  • drakma.
  • iterate.
  • md5.
  • split-sequence.
Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

6.1.1 Special variables

Special Variable: *connection*
Package

odesk.

Source

parameters.lisp.

Special Variable: *odesk-version-string*

cl-odesk version number as a string.

Package

odesk-api-asd.

Source

odesk.asd.


6.1.2 Macros

Macro: connect-odesk ((&key format public-key secret-key api-token))
Package

odesk.

Source

odesk.lisp.

Macro: with-odesk ((&key connection format public-key secret-key api-token) &body body)
Package

odesk.

Source

odesk.lisp.


Next: , Previous: , Up: Public Interface   [Contents][Index]

6.1.3 Ordinary functions

Function: auth-url (&key connection frob)

Return authentication url to be used in browser.

Package

odesk.

Source

odesk.lisp.

Function: auth/check-token (&key connection parameters)

Return authenticated user associated with authorization token.

Package

odesk.

Source

requests.lisp.

Function: auth/get-frob (&key connection parameters)

Get authentication frob.

Package

odesk.

Source

requests.lisp.

Function: auth/get-token (&key connection parameters)

Get authentication token.

Package

odesk.

Source

requests.lisp.

Function: auth/revoke-token (&key connection parameters)

Revoke given auth.

Package

odesk.

Source

requests.lisp.

Function: hr/get-companies (&key connection parameters)

Return all the companies the current authorized user has access to on oDesk

Package

odesk.

Source

requests.lisp.

Function: hr/get-company (&key connection parameters company)

Return details regarding a specific company

Package

odesk.

Source

requests.lisp.

Function: hr/get-company-teams (&key connection parameters company)

Return a list of teams within the company being referenced

Package

odesk.

Source

requests.lisp.

Function: hr/get-company-users (&key connection parameters company)

Return a list of all users within the referenced company

Package

odesk.

Source

requests.lisp.

Function: hr/get-myself (&key connection parameters)

Return info about current authenticated user

Package

odesk.

Source

requests.lisp.

Function: hr/get-team-users (&key connection parameters team)

This will return user details for all users in the referenced team

Package

odesk.

Source

requests.lisp.

Function: hr/get-teams (&key connection parameters)

This call returns all the teams that a user has acccess to

Package

odesk.

Source

requests.lisp.

Function: hr/get-user (&key connection parameters user)

Return info about some user

Package

odesk.

Source

requests.lisp.

Function: mc/get-trays (&key connection parameters)

Retrieve a list of all active trays and a message count for each.

Package

odesk.

Source

requests.lisp.

Function: mc/list-tray (&key connection parameters username tray)

Retrive tray contents.

Package

odesk.

Source

requests.lisp.

Function: profiles/get-jobs (&key connection parameters)

Search for jobs.

Package

odesk.

Source

requests.lisp.

Function: profiles/get-provider (&key connection parameters provider)

Return detailed profile information about provider

Package

odesk.

Source

requests.lisp.

Function: profiles/get-provider-brief (&key connection parameters provider)

Return brief profile information about provider

Package

odesk.

Source

requests.lisp.

Function: profiles/get-providers (&key connection parameters)

Search for workers.

Package

odesk.

Source

requests.lisp.

Function: shorturl/get-expand (&key connection parameters)

Return expanded url.

Package

odesk.

Source

requests.lisp.

Function: shorturl/get-shorten (&key connection parameters)

Return shortened url.

Package

odesk.

Source

requests.lisp.

Function: team/get-teamroom (&key connection parameters team)

Get all teamrooms accessible to the user.

Package

odesk.

Source

requests.lisp.

Function: team/get-teamrooms (&key connection parameters)

Get all teamrooms accessible to the user.

Package

odesk.

Source

requests.lisp.

Function: team/get-workdiary (&key connection parameters company username date)

Retrieve all snapshots from a single user account within a single day

Package

odesk.

Source

requests.lisp.

Function: timereports/get-agency (&key connection parameters company agency)

Generate time report for a specific agency

Package

odesk.

Source

requests.lisp.

Function: timereports/get-company (&key connection parameters company)

Generate company wide time reports

Package

odesk.

Source

requests.lisp.

Function: timereports/get-provider (&key connection parameters provider)

Generate time report for a specific provider

Package

odesk.

Source

requests.lisp.

Function: timereports/get-team (&key connection parameters company team)

Generate time report for a specific team

Package

odesk.

Source

requests.lisp.


6.1.4 Classes

Class: api
Package

odesk.

Source

odesk.lisp.

Direct methods
Direct slots
Slot: data-format

Data Format

Initform

"json"

Initargs

:data-format

Readers

data-format.

Writers

(setf data-format).

Slot: public-key

Public key

Initform

(error "must supply public key.")

Initargs

:public-key

Readers

public-key.

Writers

(setf public-key).

Slot: secret-key

Secret key

Initform

(error "must supply secret key.")

Initargs

:secret-key

Readers

secret-key.

Writers

(setf secret-key).

Slot: api-token

Api token

Initargs

:api-token

Readers

api-token.

Writers

(setf api-token).

Slot: api-version

Major version of the API.

Initform

1

Initargs

:api-version

Readers

api-version.

Writers

(setf api-version).

Slot: api-url

Base url for API requests.

Initform

odesk::*api-base-url*

Initargs

:api-url

Readers

api-url.

Writers

(setf api-url).

Slot: gds-url

Base GDS url for API requests.

Initform

odesk::*gds-base-url*

Initargs

:gds-url

Readers

gds-url.

Writers

(setf gds-url).


6.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.1 Special variables

Special Variable: *api-auth-url*
Package

odesk.

Source

parameters.lisp.

Special Variable: *api-base-url*
Package

odesk.

Source

parameters.lisp.

Special Variable: *gds-base-url*
Package

odesk.

Source

parameters.lisp.

Special Variable: *library-name*
Package

odesk.

Source

parameters.lisp.

Special Variable: *user-agent*
Package

odesk.

Source

parameters.lisp.


6.2.2 Macros

Macro: def-gds (request (&key url method version sub-url) docstring)
Package

odesk.

Source

odesk.lisp.

Macro: def-req (request (&key url method version sub-url) docstring)
Package

odesk.

Source

odesk.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.3 Ordinary functions

Function: format-url (url &key from-subs to-subs)
Package

odesk.

Source

utils.lisp.

Function: get-page (url &key method parameters)
Package

odesk.

Source

utils.lisp.


6.2.4 Generic functions

Generic Reader: api-token (object)
Generic Writer: (setf api-token) (object)
Package

odesk.

Methods
Reader Method: api-token ((api api))
Writer Method: (setf api-token) ((api api))

Api token

Source

odesk.lisp.

Target Slot

api-token.

Generic Reader: api-url (object)
Generic Writer: (setf api-url) (object)
Package

odesk.

Methods
Reader Method: api-url ((api api))
Writer Method: (setf api-url) ((api api))

Base url for API requests.

Source

odesk.lisp.

Target Slot

api-url.

Generic Reader: api-version (object)
Generic Writer: (setf api-version) (object)
Package

odesk.

Methods
Reader Method: api-version ((api api))
Writer Method: (setf api-version) ((api api))

Major version of the API.

Source

odesk.lisp.

Target Slot

api-version.

Generic Function: build-auth-url (api &key frob)

Return authentication url to be used in browser..

Package

odesk.

Source

odesk.lisp.

Methods
Method: build-auth-url ((api api) &key frob)
Generic Reader: data-format (object)
Generic Writer: (setf data-format) (object)
Package

odesk.

Methods
Reader Method: data-format ((api api))
Writer Method: (setf data-format) ((api api))

Data Format

Source

odesk.lisp.

Target Slot

data-format.

Generic Function: encode-url (api &key parameters)

Encode url parameters.

Package

odesk.

Source

odesk.lisp.

Methods
Method: encode-url ((api api) &key parameters)
Generic Reader: gds-url (object)
Generic Writer: (setf gds-url) (object)
Package

odesk.

Methods
Reader Method: gds-url ((api api))
Writer Method: (setf gds-url) ((api api))

Base GDS url for API requests.

Source

odesk.lisp.

Target Slot

gds-url.

Generic Function: parse-page (api page)

Parse fetched page.

Package

odesk.

Source

odesk.lisp.

Methods
Method: parse-page ((api api) page)
Generic Reader: public-key (object)
Generic Writer: (setf public-key) (object)
Package

odesk.

Methods
Reader Method: public-key ((api api))
Writer Method: (setf public-key) ((api api))

Public key

Source

odesk.lisp.

Target Slot

public-key.

Generic Reader: secret-key (object)
Generic Writer: (setf secret-key) (object)
Package

odesk.

Methods
Reader Method: secret-key ((api api))
Writer Method: (setf secret-key) ((api api))

Secret key

Source

odesk.lisp.

Target Slot

secret-key.

Generic Function: sign-url (api &key parameters)

Sign url parameters.

Package

odesk.

Source

odesk.lisp.

Methods
Method: sign-url ((api api) &key parameters)
Generic Function: url-read (api url &key parameters method request-type)

Return parsed object.

Package

odesk.

Source

odesk.lisp.

Methods
Method: url-read ((api api) url &key parameters method request-type)

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   M   P   S   T   U   W  
Index Entry  Section

(
(setf api-token): Private generic functions
(setf api-token): Private generic functions
(setf api-url): Private generic functions
(setf api-url): Private generic functions
(setf api-version): Private generic functions
(setf api-version): Private generic functions
(setf data-format): Private generic functions
(setf data-format): Private generic functions
(setf gds-url): Private generic functions
(setf gds-url): Private generic functions
(setf public-key): Private generic functions
(setf public-key): Private generic functions
(setf secret-key): Private generic functions
(setf secret-key): Private generic functions

A
api-token: Private generic functions
api-token: Private generic functions
api-url: Private generic functions
api-url: Private generic functions
api-version: Private generic functions
api-version: Private generic functions
auth-url: Public ordinary functions
auth/check-token: Public ordinary functions
auth/get-frob: Public ordinary functions
auth/get-token: Public ordinary functions
auth/revoke-token: Public ordinary functions

B
build-auth-url: Private generic functions
build-auth-url: Private generic functions

C
connect-odesk: Public macros

D
data-format: Private generic functions
data-format: Private generic functions
def-gds: Private macros
def-req: Private macros

E
encode-url: Private generic functions
encode-url: Private generic functions

F
format-url: Private ordinary functions
Function, auth-url: Public ordinary functions
Function, auth/check-token: Public ordinary functions
Function, auth/get-frob: Public ordinary functions
Function, auth/get-token: Public ordinary functions
Function, auth/revoke-token: Public ordinary functions
Function, format-url: Private ordinary functions
Function, get-page: Private ordinary functions
Function, hr/get-companies: Public ordinary functions
Function, hr/get-company: Public ordinary functions
Function, hr/get-company-teams: Public ordinary functions
Function, hr/get-company-users: Public ordinary functions
Function, hr/get-myself: Public ordinary functions
Function, hr/get-team-users: Public ordinary functions
Function, hr/get-teams: Public ordinary functions
Function, hr/get-user: Public ordinary functions
Function, mc/get-trays: Public ordinary functions
Function, mc/list-tray: Public ordinary functions
Function, profiles/get-jobs: Public ordinary functions
Function, profiles/get-provider: Public ordinary functions
Function, profiles/get-provider-brief: Public ordinary functions
Function, profiles/get-providers: Public ordinary functions
Function, shorturl/get-expand: Public ordinary functions
Function, shorturl/get-shorten: Public ordinary functions
Function, team/get-teamroom: Public ordinary functions
Function, team/get-teamrooms: Public ordinary functions
Function, team/get-workdiary: Public ordinary functions
Function, timereports/get-agency: Public ordinary functions
Function, timereports/get-company: Public ordinary functions
Function, timereports/get-provider: Public ordinary functions
Function, timereports/get-team: Public ordinary functions

G
gds-url: Private generic functions
gds-url: Private generic functions
Generic Function, (setf api-token): Private generic functions
Generic Function, (setf api-url): Private generic functions
Generic Function, (setf api-version): Private generic functions
Generic Function, (setf data-format): Private generic functions
Generic Function, (setf gds-url): Private generic functions
Generic Function, (setf public-key): Private generic functions
Generic Function, (setf secret-key): Private generic functions
Generic Function, api-token: Private generic functions
Generic Function, api-url: Private generic functions
Generic Function, api-version: Private generic functions
Generic Function, build-auth-url: Private generic functions
Generic Function, data-format: Private generic functions
Generic Function, encode-url: Private generic functions
Generic Function, gds-url: Private generic functions
Generic Function, parse-page: Private generic functions
Generic Function, public-key: Private generic functions
Generic Function, secret-key: Private generic functions
Generic Function, sign-url: Private generic functions
Generic Function, url-read: Private generic functions
get-page: Private ordinary functions

H
hr/get-companies: Public ordinary functions
hr/get-company: Public ordinary functions
hr/get-company-teams: Public ordinary functions
hr/get-company-users: Public ordinary functions
hr/get-myself: Public ordinary functions
hr/get-team-users: Public ordinary functions
hr/get-teams: Public ordinary functions
hr/get-user: Public ordinary functions

M
Macro, connect-odesk: Public macros
Macro, def-gds: Private macros
Macro, def-req: Private macros
Macro, with-odesk: Public macros
mc/get-trays: Public ordinary functions
mc/list-tray: Public ordinary functions
Method, (setf api-token): Private generic functions
Method, (setf api-url): Private generic functions
Method, (setf api-version): Private generic functions
Method, (setf data-format): Private generic functions
Method, (setf gds-url): Private generic functions
Method, (setf public-key): Private generic functions
Method, (setf secret-key): Private generic functions
Method, api-token: Private generic functions
Method, api-url: Private generic functions
Method, api-version: Private generic functions
Method, build-auth-url: Private generic functions
Method, data-format: Private generic functions
Method, encode-url: Private generic functions
Method, gds-url: Private generic functions
Method, parse-page: Private generic functions
Method, public-key: Private generic functions
Method, secret-key: Private generic functions
Method, sign-url: Private generic functions
Method, url-read: Private generic functions

P
parse-page: Private generic functions
parse-page: Private generic functions
profiles/get-jobs: Public ordinary functions
profiles/get-provider: Public ordinary functions
profiles/get-provider-brief: Public ordinary functions
profiles/get-providers: Public ordinary functions
public-key: Private generic functions
public-key: Private generic functions

S
secret-key: Private generic functions
secret-key: Private generic functions
shorturl/get-expand: Public ordinary functions
shorturl/get-shorten: Public ordinary functions
sign-url: Private generic functions
sign-url: Private generic functions

T
team/get-teamroom: Public ordinary functions
team/get-teamrooms: Public ordinary functions
team/get-workdiary: Public ordinary functions
timereports/get-agency: Public ordinary functions
timereports/get-company: Public ordinary functions
timereports/get-provider: Public ordinary functions
timereports/get-team: Public ordinary functions

U
url-read: Private generic functions
url-read: Private generic functions

W
with-odesk: Public macros

Jump to:   (  
A   B   C   D   E   F   G   H   M   P   S   T   U   W