-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from orbit-apps/jason/migrate-to-contexts-api
Migrate from deprecated Users API to contexts API
- Loading branch information
Showing
7 changed files
with
45 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
defmodule LaunchDarklyAPI.ContextSettings do | ||
alias LaunchDarklyAPI.REST | ||
|
||
def list(project_key, env_key, context_kind, context_key) do | ||
REST.post( | ||
"projects/#{project_key}/environments/#{env_key}/flags/evaluate", | ||
%{key: context_key, kind: context_kind} | ||
) | ||
end | ||
|
||
def update(project_key, env_key, context_kind, context_key, feature_key, values) do | ||
REST.put( | ||
"projects/#{project_key}/environments/#{env_key}/contexts/#{context_kind}/#{context_key}/flags/#{feature_key}", | ||
values | ||
) | ||
end | ||
|
||
def enable(project_key, env_key, context_kind, context_key, feature_key), | ||
do: update(project_key, env_key, context_kind, context_key, feature_key, %{setting: true}) | ||
|
||
def disable(project_key, env_key, context_kind, context_key, feature_key), | ||
do: update(project_key, env_key, context_kind, context_key, feature_key, %{setting: false}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
defmodule LaunchDarklyAPI.MixProject do | ||
use Mix.Project | ||
|
||
@version "0.2.3" | ||
@version "0.3.0" | ||
|
||
def project do | ||
[ | ||
|