Description Usage Arguments Details Value Author(s) References See Also
login
enables customers to log in to the API service
and initiates a secure session for the user. Users can have
multiple sessions 'alive' at any point in time.
logout
allows you to explicitly end your
session.
keepAlive
can be used to stop a
session timing out. Every call to the Betfair API returns a
token, in the sessionToken field, that identifies a login
session. Every time your application calls the Betfair API
and is returned a sessionToken, the session timeout is
reset to approximately 20 minutes. After the timeout has
passed, the session is expired and you need to login
again.
If you want to keep your login session active,
but your application has not made any Betfair API calls
that would generate a new sessionToken and reset the
session timeout, you can call keepAlive to obtain a new
sessionToken and reset the session timeout.
bfSessionTocken
returns the current session token,
if any, NULL otherwise.
1 2 3 4 5 | bfLogin(username, password, productId=82, ipAddress="0", locationId=0, vendorSoftwareId=0, curlOpts=list())
bfLogout(curlOpts = list())
keepAlive(curlOpts = list())
bfSessionToken()
bfSessionHandler()
|
username |
The username with which to login to the API for a new session. |
password |
The password with which to login to the API for a new session. |
productId |
The API product ID with which to login to the API for a new session. If you want to use the Free Access API, use 82. If you are a paying API subscriber, use the Id provided when you signed up. |
ipAddress |
For applications that proxy the user's connection, the IP address of the user's computer. Betfair may inform you in the future if you need to provide this field, otherwise set this field to 0 (the default). |
locationId |
The location ID with which to login for a new session. |
vendorSoftwareId |
The vendor software ID with which to login to the API for a new session. This is only relevant for software vendors and is provided when software vendors sign up. |
curlOpts |
RCurl options passed directly to
|
bfSessionHandler
(not implemented yet) creates a
session handler used to access multiple sessions. A betfair
functions can be accessed through obj$foo(...)
,
where obj
is the session handler object returned by
bfSessionHandler
. All the functions in the handler
share common parent environment where the
.sessionToken
is stored.
Every betfair API request/response must contains a session
token. All functions in betfairly-package store the
session token in .GlobalEnv in .sessionToken variable by
<<-
assignment. To manage a single account this is
appropriate. To manipulate several different sessions at
the same time create a handler for each session with
bfSessionHandler
.
invisibly a sessionToken string
Vitalie Spinu (spinuvit@gmail.com)
http://code.google.com/p/betfairly/, https://docs.developer.betfair.com/betfair/
betfairly-package
bfSimpleOutput-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.