io.kickflip.sdk.api.KickflipApiClient |
Kickflip API Client
After construction, requests can be immediately performed. The client will handle acquiring and refreshing OAuth Access tokens as needed. The client is intended to manage a unique Kickflip user per Android device installation.Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a KickflipApiClient.
| |||||||||||
Construct a KickflipApiClient.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check if a Stream is owned by the active Kickflip User.
| |||||||||||
Create a new Kickflip User.
| |||||||||||
Create a new Kickflip User.
| |||||||||||
Flag a
Stream . | |||||||||||
Get the current active Kickflip User.
| |||||||||||
Get Stream Metadata for a a public
Stream . | |||||||||||
Get Stream Metadata for a a public io.kickflip.sdk.api.json.Stream#mStreamId.
| |||||||||||
Get a List of
Stream s containing a keyword. | |||||||||||
Get a List of
Stream s near a geographic location. | |||||||||||
Get a List of
Stream objects created by the given Kickflip User. | |||||||||||
Get public user info
| |||||||||||
Login an exiting Kickflip User and make it active.
| |||||||||||
Send Stream Metadata for a
Stream . | |||||||||||
Set the current active user's meta info.
| |||||||||||
Start a new Stream.
| |||||||||||
Stop a Stream.
|
Construct a KickflipApiClient. All callbacks from this client will occur on the current calling thread.
appContext | Your Application Context |
---|---|
key | Your Kickflip Account Key |
secret | Your Kickflip Account Secret |
Construct a KickflipApiClient. All callbacks from this client will occur on the current calling thread.
appContext | Your Application Context |
---|---|
key | Your Kickflip Account Key |
secret | Your Kickflip Account Secret |
cb | A callback to be notified when the provided Kickflip credentials are verified |
Check if a Stream is owned by the active Kickflip User.
stream | the Stream to test. |
---|
Create a new Kickflip User. The User created as a result of this request is cached and managed by this KickflipApiClient throughout the life of the host Android application installation.
The other methods of this client will be performed on behalf of the user created by this request, unless noted otherwise.username | The desired username for this Kickflip User. Will be altered if not unique for this Kickflip app. |
---|---|
password | The password for this Kickflip user. |
The email address for this Kickflip user. | |
displayName | The display name for this Kickflip user. |
extraInfo | Map data to be associated with this Kickflip User. |
cb | This callback will receive a User in onSuccess(io.kickflip.sdk.api.json.Response)
or an Exception onError(io.kickflip.sdk.exception.KickflipException) .
|
Create a new Kickflip User.
The User created as a result of this request is active for this KickflipApiClient instance
throughout the life of the host Android application installation, until a subsequent call to this method
or loginUser(String, String, KickflipCallback)
}
cb | This callback will receive a User in onSuccess(io.kickflip.sdk.api.json.Response)
or an Exception onError(io.kickflip.sdk.exception.KickflipException) .
|
---|
Flag a Stream
. Used when the active Kickflip User does not own the Stream.
setStreamInfo(io.kickflip.sdk.api.json.Stream, KickflipCallback)
stream | The Stream to flag. |
---|---|
cb | A callback to receive the result of the flagging operation. |
Get the current active Kickflip User. If no User has been created, returns null.
This will be the User created on the last call tocreateNewUser(KickflipCallback)
Get Stream Metadata for a a public io.kickflip.sdk.api.json.Stream#mStreamId. The target Stream must belong a User within your Kickflip app.
This method is useful when digesting a Kickflip.io/streamId | the stream Id of the given stream. This is the value that appears
in urls of form kickflip.io/ |
---|---|
cb | A callback to receive the current Stream upon request completion
|
Get a List of Stream
s containing a keyword.
keyword | The String keyword to query |
---|---|
cb | A callback to receive the resulting List of Streams |
Get a List of Stream
s near a geographic location.
location | The target Location |
---|---|
radius | The target Radius in meters |
cb | A callback to receive the resulting List of Streams |
Get a List of Stream
objects created by the given Kickflip User.
username | the target Kickflip username |
---|---|
cb | A callback to receive the resulting List of Streams |
Get public user info
username | The Kickflip user's username |
---|---|
cb | This callback will receive a User in onSuccess(io.kickflip.sdk.api.json.Response)
or an Exception onError(io.kickflip.sdk.exception.KickflipException) .
|
Login an exiting Kickflip User and make it active.
username | The Kickflip user's username |
---|---|
password | The Kickflip user's password |
cb | This callback will receive a User in onSuccess(io.kickflip.sdk.api.json.Response)
or an Exception onError(io.kickflip.sdk.exception.KickflipException) .
|
Send Stream Metadata for a Stream
.
The target Stream must be owned by the User created with createNewUser(KickflipCallback)
from this KickflipApiClient.
stream | the Stream to get Meta data for |
---|---|
cb | A callback to receive the updated Stream upon request completion |
Set the current active user's meta info. Pass a null argument to leave it as-is.
newPassword | the user's new password |
---|---|
the user's new email address | |
displayName | The desired display name |
extraInfo | Arbitrary String data to associate with this user. |
cb | This callback will receive a User in onSuccess(io.kickflip.sdk.api.json.Response)
or an Exception onError(io.kickflip.sdk.exception.KickflipException) .
|
Start a new Stream. Must be called after
createNewUser(KickflipCallback)
Delivers stream endpoint destination data via a KickflipCallback
.
cb | This callback will receive a Stream subclass in onSuccess(io.kickflip.sdk.api.json.Response)
depending on the Kickflip account type. Implementors should
check if the response is instanceof HlsStream, RtmpStream, etc.
|
---|
Stop a Stream. Must be called after
createNewUser(KickflipCallback)
and
startStream(io.kickflip.sdk.api.json.Stream, KickflipCallback)
cb | This callback will receive a Stream subclass in onSuccess(io.kickflip.sdk.api.json.Response)
depending on the Kickflip account type. Implementors should
check if the response is instanceof HlsStream, StartRtmpStreamResponse, etc.
|
---|