StaffKit for Android
The staff SDK for Android: the AudienceKit calls staff make that members don’t. For now that’s working a venue’s
door: the venues a person can work, a night’s counts, and scanning passes. It adds them to the member SDK’s
AudienceKitClient (audience-kit-sdk) as
extension functions, sent to the audience’s staff endpoint (staffql):
import com.audiencekit.staff.doorVenuesimport com.audiencekit.staff.scanAdmissionimport com.audiencekit.staff.venueDoor
val venues = client.doorVenues() // venues whose door this person can workval tonight = client.venueDoor(venues.first().id)?.doorval result = client.scanAdmission(venueId, code) // ScanOutcome.ADMIT, RE_ENTRY, or why notArbiter’s decision queue is here too (Decisions.kt), the Android side of Swift’s DecisionQueueClient:
val waiting = client.decisions(open = true) // what needs a person, unsure firstclient.decideEvaluation(id, "reject", note = "Wrong bar") // a rejected suggestion needs a noteval status = client.decisionQueueStatus() // the server's counts and worker devicescable.subscribe(audienceId, DecisionQueries.decisionQueue, endpoint = GraphQLEndpoint.STAFF) .decisionQueueEvents() // Added, Decided, Waiting, Resubscribed, … .collect { state = state.applying(it) } // DecisionQueueState keeps the lists currentSoapbox’s newsroom is here too (Soapbox.kt), the Android side of Swift’s SoapboxClient:
val mine = client.mySoapboxPublications() // the publications they runval drafts = client.soapboxArticles(id, statuses = listOf(SoapboxArticleStatus.DRAFT))val draft = client.createSoapboxArticle(id, SoapboxArticleChanges(title = "Pride on the Hill"))client.setSoapboxArticleStatus(draft.id, SoapboxArticleAction.PUBLISH, push = SoapboxPush(listOf(localeId), SoapboxPushPurpose.EVENT), article = draft) // never asks for moneyBuilding
Section titled “Building”The member SDK isn’t published to a Maven repository yet, so this builds it from a checkout as a composite build. It
looks at audiencekit.dir (a Gradle property or in local.properties), then AUDIENCEKIT_DIR, then the
audience-kit-sdk submodule at the repository root. Then, from the repository root, with JDK 17 or newer:
./gradlew build