cfc 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -6
- data/lib/cfc/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 563b2293943b85d67b3dff9d612481addd9dc32272647691d891d3376ccdcf92
|
4
|
+
data.tar.gz: efa22237c80919923fe33a514bbb8779fd9bd9f36d568cf52c56f1f36bf02553
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b3de0e73d175282548bbf7c1e67a547d2942285feec299c3cb094af4bb836f10de4814039dc88e7df481b96c4b6a7276b3f559b353abb3b8147aacc12cf7f2f
|
7
|
+
data.tar.gz: 1b709a15c173a3d9b0476469a785e65f90d8d5e0cc76da60f20a34b2f821ae0dc6a4ebf8dba4d515df9c0f70800eef9cdb2c1865d75cc728e72322ca12d23678
|
data/README.md
CHANGED
@@ -2,17 +2,27 @@
|
|
2
2
|
Simple library for interacting with the Cloudflare API.
|
3
3
|
|
4
4
|
## Install
|
5
|
-
|
5
|
+
```
|
6
|
+
gem install cfc
|
7
|
+
```
|
8
|
+
|
9
|
+
If you're installing for development/contribution, just clone the repository.
|
6
10
|
|
7
11
|
## Usage
|
8
|
-
|
9
|
-
this
|
10
|
-
|
12
|
+
Once you've `require`d the gem, you _must_ then configure it with required credentials before you can use it. You can do
|
13
|
+
this by calling `CFC::Config.configure`, as shown below. You must provide a valid API token for the gem to use in API
|
14
|
+
requests.
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
CFC::Config.configure do |config|
|
18
|
+
config.token = 'your_api_token_here'
|
19
|
+
end
|
20
|
+
```
|
11
21
|
|
12
|
-
You can use the library either by instantiating `CFC::API` and using that class to send API requests directly,
|
22
|
+
You can then use the library either by instantiating `CFC::API` and using that class to send API requests directly,
|
13
23
|
or, for simpler tasks, you can use pre-provided objects in `lib/objects/`, which represent a data type from the
|
14
24
|
Cloudflare API and may provide methods to perform common or simple tasks on those types. See
|
15
|
-
`lib/scripts/clear_cache.rb` for an example of how this may be done
|
25
|
+
`lib/scripts/clear_cache.rb` for an example of how this may be done with `CFC::Zone` objects.
|
16
26
|
|
17
27
|
## Contributing
|
18
28
|
As with all Codidact projects, contributions are welcome and must adhere to the
|
data/lib/cfc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Codidact Foundation
|
@@ -10,7 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: '
|
13
|
+
description: 'Simple API library for interacting with the Cloudflare API. See GitHub
|
14
|
+
for usage details: https://github.com/codidact/cfc'
|
14
15
|
email: gems@codidact.org
|
15
16
|
executables: []
|
16
17
|
extensions: []
|