Skip to content

Commit 770415a

Browse files
committed
Moved to docs
1 parent 228f235 commit 770415a

File tree

1 file changed

+8
-64
lines changed

1 file changed

+8
-64
lines changed

README.md

Lines changed: 8 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,27 @@
11
<img width="100%" src="https://raw.githubusercontent.com/Flagsmith/flagsmith-frontend/master/hero.png"/>
22

3-
# Flagsmith Client
3+
# Flagsmith Ruby Client
44

5-
The SDK clients for Ruby [https://flagsmith.com/](https://www.flagsmith.com/). Flagsmith allows you to manage feature flags and remote config across multiple projects, environments and organizations.
5+
The SDK clients for Ruby [https://www.flagsmith.com/](https://www.flagsmith.com/). Flagsmith allows you to manage feature flags and remote config across multiple projects, environments and organizations.
66

7-
## Getting Started
7+
## Adding to your project
88

9-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See running in production for notes on how to deploy the project on a live system.
10-
11-
## Installing
12-
13-
### VIA gem
14-
15-
`gem install flagsmith`
16-
17-
## Usage
18-
19-
**Retrieving feature flags for your project**
20-
21-
**For full documentation visit [https://docs.flagsmith.com/](https://docs.flagsmith.com/)**
22-
23-
```ruby
24-
require "flagsmith"
25-
26-
flagsmith = Flagsmith.new("<<Your API KEY>>")
27-
28-
if flagsmith.get_value("font_size")
29-
# Do something awesome with the font size
30-
end
31-
32-
if flagsmith.feature_enabled?("does_not_exist")
33-
#do something
34-
else
35-
#do nothing, or something else
36-
end
37-
38-
```
39-
40-
**Available Options**
41-
42-
| Property | Description | Required | Default Value | Environment Key |
43-
| --------- | :-----------------------------------------------------------------------------------------------: | -------: | --------------------------------: | ----------------: |
44-
| `api_key` | Defines which project environment you wish to get flags for. _example ACME Project - Staging._ | **YES** | null | FLAGSMITH_API_KEY |
45-
| `url` | Use this property to define where you're getting feature flags from, e.g. if you're self hosting. | **NO** | https://api.flagsmith.com/api/v1/ | FLAGSMITH_URL |
46-
47-
**Available Functions**
48-
49-
| Property | Description |
50-
| ------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------: |
51-
| `init` | Initialize the sdk against a particular environment |
52-
| `feature_enabled?(key)` | Get the value of a particular feature e.g. `flagsmith.feature_enabled?("powerUserFeature") // true` |
53-
| `feature_enabled?(key, user_id, default = false)` | Get the value of a particular feature for a user e.g. `flagsmith.feature_enabled?("powerUserFeature", 1234) // true` |
54-
| `get_value(key)` | Get the value of a particular feature e.g. `flagsmith.get_value("font_size") // 10` |
55-
| `get_value(key, user_id, default = nil)` | Get the value of a particular feature for a specified user e.g. `flagsmith.get_value("font_size", 1234) // 15` |
56-
| `get_flags()` | Trigger a manual fetch of the environment features, if a user is identified it will fetch their features |
57-
| `get_flags(user_id)` | Trigger a manual fetch of the environment features with a given user id |
58-
| `set_trait(user_id, trait, value)` | Set the value of a trait for the given user id |
59-
60-
**Identifying Users**
61-
62-
Identifying users allows you to target specific users from the [Flagsmith dashboard](https://www.flagsmith.com/).
63-
You can include an optional user identifier as part of the `feature_enabled?` and `get_value` methods to retrieve unique user flags and variables.
9+
For full documentation visit [https://docs.flagsmith.com/clients/ruby/](https://docs.flagsmith.com/clients/ruby/)
6410

6511
## Contributing
6612

67-
Please read [CONTRIBUTING.md](https://gist.github.com/kyle-ssg/c36a03aebe492e45cbd3eefb21cb0486) for details on our code of conduct, and the process for submitting pull requests to us.
13+
Please read [CONTRIBUTING.md](https://gist.github.com/kyle-ssg/c36a03aebe492e45cbd3eefb21cb0486) for details on our code of conduct, and the process for submitting pull requests
6814

6915
## Getting Help
7016

7117
If you encounter a bug or feature request we would like to hear about it. Before you submit an issue please search existing issues in order to prevent duplicates.
7218

7319
## Get in touch
7420

75-
If you have any questions about our projects you can email <a href="mailto:projects@solidstategroup.com">projects@solidstategroup.com</a>.
21+
If you have any questions about our projects you can email <a href="mailto:support@flagsmith.com">support@flagsmith.com</a>.
7622

7723
## Useful links
7824

79-
[Website](https://flagsmith.com)
80-
81-
[Documentation](https://docs.flagsmith.com/)
25+
[Website](https://www.flagsmith.com/)
8226

83-
[YouTube Tutorials](https://www.youtube.com/channel/UCki7GZrOdZZcsV9rAIRchCw)
27+
[Documentation](https://docs.flagsmith.com/)

0 commit comments

Comments
 (0)