Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript integration package #4

Open
JakeCooper opened this issue Feb 14, 2018 · 1 comment
Open

JavaScript integration package #4

JakeCooper opened this issue Feb 14, 2018 · 1 comment

Comments

@JakeCooper
Copy link
Member

JakeCooper commented Feb 14, 2018

Need integration for a package which can be installed and used by developers.

Requires an init function to load the darklaunch codes from server, as well as bind the unique ID to use for user based dark launching. If uniqueID is not given, then the server will be responsible for keeping track of these users for their session (See #3)

Darklaunch.init(uniqueID)

Additionally require something along the lines of

if (Darklaunch.flag(code)) {
    // Has access to the darklaunched feature
} else {
    // No access to darklaunch.
}

flag(code) will check the darklaunch bundle in the store (Grabbed on init) and perform the series of operations required to determine if they're eligible to darklaunch. This step will only consist of lookup in the Darklaunch Store, which should get initiated when we call Darklaunch.init().

This integration package will only make requests to the /darklaunch_bundle endpoint (During init). This info will be cached and used for Darklaunch.flag(code) calls. This endpoint will require no authentication, unlike the any of the endpoints which deal with code creation or deletion.

@JakeCooper
Copy link
Member Author

Following this, additional language integrations can be added, but let's start with JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant