JubeatPlus 3.9.11
Loading...
Searching...
No Matches
jubeatLabAccess Class Reference

Builds and holds an HTTP request to the jubeatLab API and reports its outcome to a delegate. More...

#include <jubeatLabAccess.h>

Inheritance diagram for jubeatLabAccess:
Collaboration diagram for jubeatLabAccess:

Instance Methods

(void) - startAccess
 Starts the request on the main queue.
(void) - cancel
 Abandons the request: clears the weak delegate, cancels the task, and drops the data.
(nullable NSData *) - getData
 The accumulated response body.
(nullable NSDictionary *) - getDataInJSON
 The response body decoded as a JSON dictionary, or nil when it is absent or not a dictionary.
(NSUInteger) - currentSize
 The number of bytes received so far.
(float) - currentProgress
 The download progress in [0, 1], or 0 when the expected length is unknown.
(instancetype) - initWithURL:delegate:
 Builds a plain GET request to a URL.
(instancetype) - initWithURL:sendData:command:delegate:
 Builds a request to a URL with a body and an explicit HTTP method.
(nullable NSURL *) - getApiPath:api:
 Builds the URL for an API endpoint.
(NSDictionary *) - getKeyQuery:
 Builds the keychain lookup query for an account.
(nullable NSString *) - getKeyString:
 Reads the keychain payload for an account and decodes it as a UTF-8 string.
(instancetype) - initUIDApi:
 Starts a create-user-identifier request, POSTing the device UUID.
(instancetype) - initSessionApi:
 Starts a session-open request, POSTing the passphrase for the current editor identifier.
(instancetype) - initTopPageSessionApi:
 Starts a top-page session-open request (the Session2 variant).
(instancetype) - initLicenseVersionApi:
 Starts a GET for the privacy-policy last-update timestamp.
(instancetype) - initLicenseApi:
 Starts a GET for the privacy policy.
(instancetype) - initTopPageApi:
 Starts a GET for the lab top-page URL.
(instancetype) - initUploadApi:seqData:
 Starts an upload of a custom sequence.
(instancetype) - initDownloadApi:seqID:
 Starts a GET of a shared sequence by its identifier.
(instancetype) - initComprisedPackApi:tuneID:
 Starts a GET of the recommended pack for a tune.
(instancetype) - initGoodJobApi:tuneID:seqID:
 Starts a good-job (like) POST for a sequence.
(instancetype) - initLevelApi:tuneID:seqID:level:
 Starts a vote-level POST for a sequence.
(instancetype) - initPlayApi:tuneID:seqID:
 Starts a play-count POST for a sequence.
(instancetype) - initCreateUserID:userID:name:userType:
 Starts a special-user creation POST.

Class Methods

(nullable NSURL *) + getWebPagePath:pagePath:
 Builds a web-page URL under the lab host.
(nullable NSURL *) + getUserPageURL
 The user-management web page URL.
(nullable NSURL *) + getUserPageSessionFailedURL
 The session-error web page URL.
(nullable NSURL *) + getSequenceSerchURL:
 The sequence-search web page URL for a music identifier.
(nullable NSURL *) + getSequencePageURL:
 The sequence-detail web page URL for a sequence identifier.

Detailed Description

Builds and holds an HTTP request to the jubeatLab API and reports its outcome to a delegate.

Method Documentation

◆ cancel

- (void) cancel

Abandons the request: clears the weak delegate, cancels the task, and drops the data.

Ghidra address:
0x1dab20

◆ currentProgress

- (float) currentProgress

The download progress in [0, 1], or 0 when the expected length is unknown.

Returns
The progress in [0, 1], or 0 when the expected length is unknown.
Ghidra address:
0x1daea4
Ghidra address:
0x1daea4

◆ currentSize

- (NSUInteger) currentSize

The number of bytes received so far.

Returns
The byte count received so far.
Ghidra address:
0x1dae8c
Ghidra address:
0x1dae8c

◆ getApiPath:api:

- (nullable NSURL *) getApiPath: (nullable NSString *) scheme
api: (nullable NSString *) api 

Builds the URL for an API endpoint.

Assembles "<scheme>://jubeat-lab.s.game.konami.jp/aqq/api/JP/v1/<api>" . The scheme is the scheme argument verbatim; the binary tests it against "https" but discards the result.

Parameters
schemeThe URL scheme, for example "https".
apiThe API path segment, for example "users".
Returns
The endpoint URL.
Ghidra address:
0x1d8f8c

◆ getData

- (NSData *) getData

The accumulated response body.

Returns
The bytes received so far.
Ghidra address:
0x1daf10
Ghidra address:
0x1daf10

◆ getDataInJSON

- (NSDictionary *) getDataInJSON

The response body decoded as a JSON dictionary, or nil when it is absent or not a dictionary.

Returns
The decoded JSON dictionary, or nil when it is absent or not a dictionary.
Ghidra address:
0x1daf20
Ghidra address:
0x1daf20

◆ getKeyQuery:

- (NSDictionary *) getKeyQuery: (nullable id) key

Builds the keychain lookup query for an account.

Identical to +[EditorIDManager getKeyQuery:] .

Parameters
keyThe account name.
Returns
The query dictionary.
Ghidra address:
0x1d8840

◆ getKeyString:

- (nullable NSString *) getKeyString: (nullable id) key

Reads the keychain payload for an account and decodes it as a UTF-8 string.

Identical to +[EditorIDManager getKeyString:] .

Parameters
keyThe account name.
Returns
The stored string, or nil when the lookup fails.
Ghidra address:
0x1d89b0

◆ getSequencePageURL:

+ (nullable NSURL *) getSequencePageURL: (nullable id) sequenceID

The sequence-detail web page URL for a sequence identifier.

Parameters
sequenceIDThe sequence identifier.
Returns
The detail-page URL.
Ghidra address:
0x1db224

◆ getSequenceSerchURL:

+ (NSURL *) getSequenceSerchURL: (int) musicID

The sequence-search web page URL for a music identifier.

Parameters
musicIDThe music identifier.
Returns
The search-page URL.
Ghidra address:
0x1db160
Ghidra address:
0x1db160

◆ getUserPageSessionFailedURL

+ (NSURL *) getUserPageSessionFailedURL

The session-error web page URL.

Returns
The session-error page URL.
Ghidra address:
0x1db0e8
Ghidra address:
0x1db0e8

◆ getUserPageURL

+ (NSURL *) getUserPageURL

The user-management web page URL.

Returns
The user-management page URL.
Ghidra address:
0x1db05c
Ghidra address:
0x1db05c

◆ getWebPagePath:pagePath:

+ (nullable NSURL *) getWebPagePath: (nullable NSString *) scheme
pagePath: (nullable NSString *) pagePath 

Builds a web-page URL under the lab host.

Assembles "<scheme>://jubeat-lab.s.game.konami.jp/<pagePath>" . As with -getApiPath:api: the scheme is used verbatim and the "https" comparison is discarded.

Parameters
schemeThe URL scheme.
pagePathThe page path under the host.
Returns
The page URL.
Ghidra address:
0x1d8e90

◆ initComprisedPackApi:tuneID:

- (instancetype) initComprisedPackApi: (nullable id) delegate
tuneID: (unsigned int) tuneID 

Starts a GET of the recommended pack for a tune.

Parameters
delegateThe object told how the request finished.
tuneIDThe tune identifier.
Returns
The initialised client.
Ghidra address:
0x1d96c8

◆ initCreateUserID:userID:name:userType:

- (instancetype) initCreateUserID: (nullable id) delegate
userID: (nullable id) userID
name: (nullable id) name
userType: (int) userType 

Starts a special-user creation POST.

POSTs {userName, userID, userType} to users/SpecialUser .

Parameters
delegateThe object told how the request finished.
userIDThe user identifier.
nameThe user name.
userTypeThe user type.
Returns
The initialised client.
Ghidra address:
0x1da760

◆ initDownloadApi:seqID:

- (instancetype) initDownloadApi: (nullable id) delegate
seqID: (nullable id) seqID 

Starts a GET of a shared sequence by its identifier.

Fetches seqs/<seqID>?userID=<editorID> .

Parameters
delegateThe object told how the request finished.
seqIDThe sequence identifier.
Returns
The initialised client.
Ghidra address:
0x1d9588

◆ initGoodJobApi:tuneID:seqID:

- (instancetype) initGoodJobApi: (nullable id) delegate
tuneID: (int) tuneID
seqID: (nullable id) seqID 

Starts a good-job (like) POST for a sequence.

POSTs {userID, musicID} to seqs/<seqID>/Like . A missing editor identifier is sent as "ERRUSR".

Parameters
delegateThe object told how the request finished.
tuneIDThe tune identifier.
seqIDThe sequence identifier.
Returns
The initialised client.
Ghidra address:
0x1d976c

◆ initLevelApi:tuneID:seqID:level:

- (instancetype) initLevelApi: (nullable id) delegate
tuneID: (int) tuneID
seqID: (nullable id) seqID
level: (int) level 

Starts a vote-level POST for a sequence.

POSTs {level, userID, musicID} to seqs/<seqID>/VoteLevel .

Parameters
delegateThe object told how the request finished.
tuneIDThe tune identifier.
seqIDThe sequence identifier.
levelThe voted level.
Returns
The initialised client.
Ghidra address:
0x1d9a5c

◆ initLicenseApi:

- (instancetype) initLicenseApi: (nullable id) delegate

Starts a GET for the privacy policy.

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1da694

◆ initLicenseVersionApi:

- (instancetype) initLicenseVersionApi: (nullable id) delegate

Starts a GET for the privacy-policy last-update timestamp.

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1da5c8

◆ initPlayApi:tuneID:seqID:

- (instancetype) initPlayApi: (nullable id) delegate
tuneID: (int) tuneID
seqID: (nullable id) seqID 

Starts a play-count POST for a sequence.

POSTs {userID, musicID} to seqs/<seqID>/Played .

Parameters
delegateThe object told how the request finished.
tuneIDThe tune identifier.
seqIDThe sequence identifier.
Returns
The initialised client.
Ghidra address:
0x1d9d88

◆ initSessionApi:

- (instancetype) initSessionApi: (nullable id) delegate

Starts a session-open request, POSTing the passphrase for the current editor identifier.

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1da078

◆ initTopPageApi:

- (instancetype) initTopPageApi: (nullable id) delegate

Starts a GET for the lab top-page URL.

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1da948

◆ initTopPageSessionApi:

- (instancetype) initTopPageSessionApi: (nullable id) delegate

Starts a top-page session-open request (the Session2 variant).

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1da320

◆ initUIDApi:

- (instancetype) initUIDApi: (nullable id) delegate

Starts a create-user-identifier request, POSTing the device UUID.

Parameters
delegateThe object told how the request finished.
Returns
The initialised client.
Ghidra address:
0x1d90a8

◆ initUploadApi:seqData:

- (instancetype) initUploadApi: (nullable id) delegate
seqData: (nullable NSData *) seqData 

Starts an upload of a custom sequence.

POSTs {uuid, passwd, jcfData} to users/<editorID>/seqs , with the sequence data base64-encoded.

Parameters
delegateThe object told how the request finished.
seqDataThe sequence data to upload.
Returns
The initialised client.
Ghidra address:
0x1d9228

◆ initWithURL:delegate:

- (instancetype) initWithURL: (nullable NSURL *) url
delegate: (nullable id) delegate 

Builds a plain GET request to a URL.

Creates a 15-second NSMutableURLRequest , stamps the application's User-Agent, and stores the request and the weakly-held delegate.

Parameters
urlThe endpoint.
delegateThe object told how the request finished. Held weakly.
Returns
The initialised client.
Ghidra address:
0x1d8b20

◆ initWithURL:sendData:command:delegate:

- (instancetype) initWithURL: (nullable NSURL *) url
sendData: (nullable NSData *) sendData
command: (nullable NSString *) command
delegate: (nullable id) delegate 

Builds a request to a URL with a body and an explicit HTTP method.

Sets the method, a application/json content type, and the body's length; when a body is present it is attached and the User-Agent stamped. Stores the request and the weak delegate.

Parameters
urlThe endpoint.
sendDataThe request body, or nil.
commandThe HTTP method (for example "POST").
delegateThe object told how the request finished. Held weakly.
Returns
The initialised client.
Ghidra address:
0x1d8c64

◆ startAccess

- (void) startAccess

Starts the request on the main queue.

Cancels any running task, opens an NSURLSession with this object as its delegate, and resumes a data task for the built request.

Ghidra address:
0x1daa14
Ghidra address:
0x1daa14

The documentation for this class was generated from the following files: