contentful-management 1.8.1 → 1.9.0
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/.rubocop.yml +1 -1
- data/CHANGELOG.md +15 -0
- data/README.md +209 -41
- data/contentful-management.gemspec +1 -1
- data/lib/contentful/management/asset.rb +1 -1
- data/lib/contentful/management/client.rb +155 -31
- data/lib/contentful/management/client_organization_methods_factory.rb +23 -0
- data/lib/contentful/management/client_personal_access_tokens_methods_factory.rb +27 -0
- data/lib/contentful/management/client_snapshot_methods_factory.rb +16 -6
- data/lib/contentful/management/client_space_membership_methods_factory.rb +15 -0
- data/lib/contentful/management/client_ui_extension_methods_factory.rb +15 -0
- data/lib/contentful/management/client_user_methods_factory.rb +27 -0
- data/lib/contentful/management/client_webhook_call_methods_factory.rb +30 -0
- data/lib/contentful/management/client_webhook_health_methods_factory.rb +27 -0
- data/lib/contentful/management/content_type.rb +10 -0
- data/lib/contentful/management/content_type_snapshot_methods_factory.rb +35 -0
- data/lib/contentful/management/editor_interface.rb +1 -1
- data/lib/contentful/management/organization.rb +20 -0
- data/lib/contentful/management/personal_access_token.rb +45 -0
- data/lib/contentful/management/request.rb +0 -1
- data/lib/contentful/management/resource.rb +4 -2
- data/lib/contentful/management/resource_builder.rb +15 -0
- data/lib/contentful/management/snapshot.rb +31 -20
- data/lib/contentful/management/space.rb +32 -10
- data/lib/contentful/management/space_membership.rb +43 -0
- data/lib/contentful/management/space_space_membership_methods_factory.rb +15 -0
- data/lib/contentful/management/space_ui_extension_methods_factory.rb +15 -0
- data/lib/contentful/management/ui_extension.rb +106 -0
- data/lib/contentful/management/user.rb +28 -0
- data/lib/contentful/management/version.rb +1 -1
- data/lib/contentful/management/webhook.rb +20 -0
- data/lib/contentful/management/webhook_call.rb +77 -0
- data/lib/contentful/management/webhook_health.rb +79 -0
- data/lib/contentful/management/webhook_webhook_call_methods_factory.rb +30 -0
- data/lib/contentful/management/webhook_webhook_health_methods_factory.rb +28 -0
- data/spec/fixtures/vcr_cassettes/get_request.yml +34 -17
- data/spec/fixtures/vcr_cassettes/organization/all.yml +100 -0
- data/spec/fixtures/vcr_cassettes/personal_access_token/all.yml +101 -0
- data/spec/fixtures/vcr_cassettes/personal_access_token/create.yml +94 -0
- data/spec/fixtures/vcr_cassettes/personal_access_token/find.yml +91 -0
- data/spec/fixtures/vcr_cassettes/personal_access_token/find_not_found.yml +88 -0
- data/spec/fixtures/vcr_cassettes/personal_access_token/revoke.yml +179 -0
- data/spec/fixtures/vcr_cassettes/snapshot/ct_all.yml +207 -0
- data/spec/fixtures/vcr_cassettes/snapshot/ct_find.yml +198 -0
- data/spec/fixtures/vcr_cassettes/snapshot/ct_find_not_found.yml +94 -0
- data/spec/fixtures/vcr_cassettes/space/all_disabled_cache.yml +428 -0
- data/spec/fixtures/vcr_cassettes/space/disabled_cache.yml +120 -0
- data/spec/fixtures/vcr_cassettes/space_memberships/all.yml +190 -0
- data/spec/fixtures/vcr_cassettes/space_memberships/create.yml +143 -0
- data/spec/fixtures/vcr_cassettes/space_memberships/delete.yml +322 -0
- data/spec/fixtures/vcr_cassettes/space_memberships/find.yml +141 -0
- data/spec/fixtures/vcr_cassettes/ui_extension/all.yml +1020 -0
- data/spec/fixtures/vcr_cassettes/ui_extension/create.yml +133 -0
- data/spec/fixtures/vcr_cassettes/ui_extension/delete.yml +291 -0
- data/spec/fixtures/vcr_cassettes/ui_extension/find.yml +126 -0
- data/spec/fixtures/vcr_cassettes/user/find.yml +96 -0
- data/spec/fixtures/vcr_cassettes/webhook_call/all.yml +151 -0
- data/spec/fixtures/vcr_cassettes/webhook_call/find.yml +88 -0
- data/spec/fixtures/vcr_cassettes/webhook_call/find_not_found.yml +93 -0
- data/spec/fixtures/vcr_cassettes/webhook_health/find.yml +111 -0
- data/spec/lib/contentful/management/client_spec.rb +25 -26
- data/spec/lib/contentful/management/entry_spec.rb +48 -48
- data/spec/lib/contentful/management/organization_spec.rb +33 -0
- data/spec/lib/contentful/management/personal_access_token_spec.rb +85 -0
- data/spec/lib/contentful/management/snapshot_spec.rb +134 -47
- data/spec/lib/contentful/management/space_membership_spec.rb +147 -0
- data/spec/lib/contentful/management/space_spec.rb +35 -1
- data/spec/lib/contentful/management/ui_extension_spec.rb +276 -0
- data/spec/lib/contentful/management/user_spec.rb +52 -0
- data/spec/lib/contentful/management/webhook_calls_spec.rb +69 -0
- data/spec/lib/contentful/management/webhook_health_spec.rb +51 -0
- metadata +88 -8
- data/lib/contentful/management/http_client.rb +0 -89
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb5ebdbf246240b9eeaf315eb01fd8950cce67a4
|
4
|
+
data.tar.gz: bb20ddab6ba4bd2ee7353e2d9c5eb841027955b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a365765f6243235b658fc34e692939687e44d7d679fde7c3a93417c64d63bb0421d5fe128d9d5df831d3370d055ae7ff7ca7530892bfdc7962a68d57b1cf1139
|
7
|
+
data.tar.gz: 978075d563968f6cca95c76d0a96ab15fb4068c13e9f7f1f8c395a93ab9ae04103760647ce21c0c4f0aaf672eb7daa1a63699b3bf032b1ff1f53798daabf8b2c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
+
## 1.9.0
|
6
|
+
### Added
|
7
|
+
* Added option to disable Content Type caching completely.
|
8
|
+
* Added UI Extension Endpoint.
|
9
|
+
* Added Space Memberships Endpoint.
|
10
|
+
* Added Webhook Calls Endpoint.
|
11
|
+
* Added Webhook Health Endpoint.
|
12
|
+
* Added Content Type Snapshots Endpoint.
|
13
|
+
* Added Organizations Endpoint.
|
14
|
+
* Added User Endpoint.
|
15
|
+
* Added Personal Access Tokens Endpoint.
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
* Rewrote HTTP internals in order to allow base-level resources and simplified Client.
|
19
|
+
|
5
20
|
## 1.8.1
|
6
21
|
### Added
|
7
22
|
* Added missing validation property for assets [#121](https://github.com/contentful/contentful-management.rb/pull/121)
|
data/README.md
CHANGED
@@ -8,8 +8,9 @@ Contentful is a content management platform for web applications, mobile apps an
|
|
8
8
|
## Setup
|
9
9
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
|
-
|
12
|
-
|
11
|
+
```ruby
|
12
|
+
gem 'contentful-management'
|
13
|
+
```
|
13
14
|
|
14
15
|
## Usage
|
15
16
|
|
@@ -21,6 +22,8 @@ Some examples can be found in the ```examples/``` directory or you take a look a
|
|
21
22
|
At the beginning the API client instance should be created for each thread that is going to be used in your application:
|
22
23
|
|
23
24
|
```ruby
|
25
|
+
require 'contentful/management'
|
26
|
+
|
24
27
|
client = Contentful::Management::Client.new('access_token')
|
25
28
|
```
|
26
29
|
|
@@ -34,7 +37,7 @@ Retrieving all spaces:
|
|
34
37
|
spaces = client.spaces.all
|
35
38
|
```
|
36
39
|
|
37
|
-
Retrieving one space by
|
40
|
+
Retrieving one space by ID:
|
38
41
|
|
39
42
|
```ruby
|
40
43
|
blog_space = client.spaces.find('blog_space_id')
|
@@ -137,7 +140,7 @@ asset.file_with_locales= {'en-US' => en_file, 'pl' => pl_file}
|
|
137
140
|
asset.save
|
138
141
|
```
|
139
142
|
|
140
|
-
Process an
|
143
|
+
Process an asset file after create:
|
141
144
|
```ruby
|
142
145
|
asset.process_file
|
143
146
|
```
|
@@ -218,7 +221,7 @@ Finding an upload:
|
|
218
221
|
upload = client.uploads.find('space_id', 'upload_id')
|
219
222
|
```
|
220
223
|
|
221
|
-
Deleting an upload
|
224
|
+
Deleting an upload:
|
222
225
|
|
223
226
|
```ruby
|
224
227
|
upload.destroy
|
@@ -267,7 +270,7 @@ or
|
|
267
270
|
entries = content_type.entries.all
|
268
271
|
```
|
269
272
|
|
270
|
-
Retrieving an entry by
|
273
|
+
Retrieving an entry by ID:
|
271
274
|
|
272
275
|
```ruby
|
273
276
|
entry = blog_space.entries.find('entry_id')
|
@@ -348,11 +351,11 @@ Checking if the entry is published:
|
|
348
351
|
my_entry.published?
|
349
352
|
```
|
350
353
|
|
351
|
-
> Entries created with *empty fields*, will not return those fields in the response. Therefore,
|
352
|
-
> make an extra request to fetch the
|
353
|
-
> To allow for
|
354
|
-
> * Enable [
|
355
|
-
> * Query
|
354
|
+
> Entries created with *empty fields*, will not return those fields in the response. Therefore, entries that don't have cache enabled, will need to
|
355
|
+
> make an extra request to fetch the content type and fill the missing fields.
|
356
|
+
> To allow for content type caching:
|
357
|
+
> * Enable [content type cache](#content-type-cache) at client instantiation time
|
358
|
+
> * Query entries through `space.entries.find` instead of `Entry.find(space_id, entry_id)`
|
356
359
|
|
357
360
|
### Content Types
|
358
361
|
|
@@ -368,7 +371,7 @@ Retrieving all published content types from a space:
|
|
368
371
|
blog_post_content_types = blog_space.content_types.all_published
|
369
372
|
```
|
370
373
|
|
371
|
-
Retrieving one content type by
|
374
|
+
Retrieving one content type by ID from a space:
|
372
375
|
|
373
376
|
```ruby
|
374
377
|
blog_post_content_type = blog_space.content_types.find(id)
|
@@ -540,23 +543,26 @@ Retrieving all locales from the space:
|
|
540
543
|
blog_post_locales = blog_space.locales.all
|
541
544
|
```
|
542
545
|
|
543
|
-
Retrieving one locale by
|
546
|
+
Retrieving one locale by ID from the space:
|
544
547
|
|
545
548
|
```ruby
|
546
549
|
blog_post_locale = blog_space.locales.find(locale_id)
|
547
550
|
```
|
548
551
|
|
549
|
-
Creating a locale
|
552
|
+
Creating a locale:
|
553
|
+
|
550
554
|
```ruby
|
551
555
|
blog_space.locales.create(name: 'German', code: 'de-DE')
|
552
556
|
```
|
553
557
|
|
554
|
-
Updating a locale
|
558
|
+
Updating a locale:
|
559
|
+
|
555
560
|
```ruby
|
556
561
|
blog_post_locale.update(name: 'German', code: 'de-DE')
|
557
562
|
```
|
558
563
|
|
559
|
-
Destroying a locale
|
564
|
+
Destroying a locale:
|
565
|
+
|
560
566
|
```ruby
|
561
567
|
blog_post_locale.destroy
|
562
568
|
```
|
@@ -569,13 +575,14 @@ Retrieving all roles from the space:
|
|
569
575
|
blog_post_roles = blog_space.roles.all
|
570
576
|
```
|
571
577
|
|
572
|
-
Retrieving one role by
|
578
|
+
Retrieving one role by ID from the space:
|
573
579
|
|
574
580
|
```ruby
|
575
581
|
blog_post_role = blog_space.role.find(role_id)
|
576
582
|
```
|
577
583
|
|
578
|
-
Creating a role
|
584
|
+
Creating a role:
|
585
|
+
|
579
586
|
```ruby
|
580
587
|
role_attributes = {
|
581
588
|
name: 'My Role',
|
@@ -611,12 +618,14 @@ role_attributes = {
|
|
611
618
|
blog_space.roles.create(role_attributes)
|
612
619
|
```
|
613
620
|
|
614
|
-
Updating a role
|
621
|
+
Updating a role:
|
622
|
+
|
615
623
|
```ruby
|
616
624
|
blog_post_role.update(name: 'Some Other Role') # Can change any attribute here
|
617
625
|
```
|
618
626
|
|
619
|
-
Destroying a role
|
627
|
+
Destroying a role:
|
628
|
+
|
620
629
|
```ruby
|
621
630
|
blog_post_role.destroy
|
622
631
|
```
|
@@ -628,13 +637,13 @@ Retrieving all webhooks from the space:
|
|
628
637
|
```ruby
|
629
638
|
webhooks = blog_space.webhooks.all
|
630
639
|
```
|
631
|
-
Retrieving one webhook by
|
640
|
+
Retrieving one webhook by ID from the space:
|
632
641
|
|
633
642
|
```ruby
|
634
643
|
blog_post_webhook = blog_space.webhooks.find(webhook_id)
|
635
644
|
```
|
636
645
|
|
637
|
-
Creating a webhook
|
646
|
+
Creating a webhook:
|
638
647
|
|
639
648
|
```ruby
|
640
649
|
blog_space.webhooks.create(
|
@@ -645,19 +654,19 @@ blog_space.webhooks.create(
|
|
645
654
|
)
|
646
655
|
```
|
647
656
|
|
648
|
-
Updating a webhook
|
657
|
+
Updating a webhook:
|
649
658
|
|
650
659
|
```ruby
|
651
660
|
blog_post_webhook.update(url: 'https://www.newlink.com')
|
652
661
|
```
|
653
662
|
|
654
|
-
Destroying webhook:
|
663
|
+
Destroying a webhook:
|
655
664
|
|
656
665
|
```ruby
|
657
666
|
blog_post_webhook.destroy
|
658
667
|
```
|
659
668
|
|
660
|
-
Creating a
|
669
|
+
Creating a webhook with custom headers and custom topics:
|
661
670
|
|
662
671
|
```ruby
|
663
672
|
blog_space.webhooks.create(
|
@@ -673,25 +682,163 @@ blog_space.webhooks.create(
|
|
673
682
|
)
|
674
683
|
```
|
675
684
|
|
676
|
-
|
685
|
+
#### Webhook Calls
|
677
686
|
|
678
|
-
Retrieving all
|
687
|
+
Retrieving all webhook call details from a webhook:
|
688
|
+
|
689
|
+
```ruby
|
690
|
+
all_call_details = my_webhook.webhook_calls.all
|
691
|
+
```
|
692
|
+
Retrieving one webhook call detail by ID from a webhook:
|
693
|
+
|
694
|
+
```ruby
|
695
|
+
call_details = my_webhook.webhook_calls.find(call_id)
|
696
|
+
```
|
697
|
+
|
698
|
+
#### Webhook Health
|
699
|
+
|
700
|
+
Retrieving webhook health details from a webhook:
|
701
|
+
|
702
|
+
```ruby
|
703
|
+
health_details = my_webhook.webhook_health.find
|
704
|
+
```
|
705
|
+
|
706
|
+
### Space Memberships
|
707
|
+
|
708
|
+
Retrieving all space memberships from the space:
|
709
|
+
|
710
|
+
```ruby
|
711
|
+
memberships = blog_space.space_memberships.all
|
712
|
+
```
|
713
|
+
Retrieving one space membership by ID from the space:
|
714
|
+
|
715
|
+
```ruby
|
716
|
+
blog_post_membership = blog_space.space_memberships.find(membership_id)
|
717
|
+
```
|
718
|
+
|
719
|
+
Creating a space membership:
|
720
|
+
|
721
|
+
```ruby
|
722
|
+
blog_space.space_memberships.create(
|
723
|
+
admin: false,
|
724
|
+
roles: [
|
725
|
+
{
|
726
|
+
'sys' => {
|
727
|
+
'type' => 'Link',
|
728
|
+
'linkType' => 'Role',
|
729
|
+
'id' => 'my_role_id'
|
730
|
+
}
|
731
|
+
}
|
732
|
+
],
|
733
|
+
email: 'foobar@example.com'
|
734
|
+
)
|
735
|
+
```
|
736
|
+
|
737
|
+
Updating a space membership:
|
738
|
+
|
739
|
+
```ruby
|
740
|
+
blog_post_membership.update(admin: true)
|
741
|
+
```
|
742
|
+
|
743
|
+
Destroying a space membership:
|
744
|
+
|
745
|
+
```ruby
|
746
|
+
blog_post_membership.destroy
|
747
|
+
```
|
748
|
+
|
749
|
+
### Organizations
|
750
|
+
|
751
|
+
Retrieving all organization details:
|
752
|
+
|
753
|
+
```ruby
|
754
|
+
organizations = client.organizations.all
|
755
|
+
```
|
756
|
+
|
757
|
+
### Users
|
758
|
+
|
759
|
+
Retrieving current user details:
|
760
|
+
|
761
|
+
```ruby
|
762
|
+
user = client.users.me
|
763
|
+
```
|
764
|
+
|
765
|
+
### UI Extensions
|
766
|
+
|
767
|
+
Retrieving all UI extensions from the space:
|
768
|
+
|
769
|
+
```ruby
|
770
|
+
extensions = blog_space.ui_extensions.all
|
771
|
+
```
|
772
|
+
Retrieving one UI extension by ID from the space:
|
773
|
+
|
774
|
+
```ruby
|
775
|
+
blog_post_extension = blog_space.ui_extensions.find(extension_id)
|
776
|
+
```
|
777
|
+
|
778
|
+
Creating a UI extension:
|
779
|
+
|
780
|
+
```ruby
|
781
|
+
blog_space.ui_extensions.create(
|
782
|
+
extension: {
|
783
|
+
'name' => 'My extension',
|
784
|
+
'src' => 'https://www.example.com',
|
785
|
+
'fieldTypes' => [{"type": "Symbol"}],
|
786
|
+
'sidebar' => false
|
787
|
+
}
|
788
|
+
)
|
789
|
+
```
|
790
|
+
|
791
|
+
Destroying a UI extension:
|
792
|
+
|
793
|
+
```ruby
|
794
|
+
blog_post_extension.destroy
|
795
|
+
```
|
796
|
+
|
797
|
+
### API Keys
|
798
|
+
|
799
|
+
Retrieving all API keys from the space:
|
679
800
|
|
680
801
|
```ruby
|
681
802
|
blog_post_api_keys = blog_space.api_keys.all
|
682
803
|
```
|
683
804
|
|
684
|
-
Retrieving one
|
805
|
+
Retrieving one API key by ID from the space:
|
685
806
|
|
686
807
|
```ruby
|
687
808
|
blog_post_api_key = blog_space.api_keys.find(api_key_id)
|
688
809
|
```
|
689
810
|
|
690
|
-
Creating an
|
811
|
+
Creating an API key:
|
691
812
|
```ruby
|
692
813
|
blog_space.api_keys.create(name: 'foobar key', description: 'key for foobar mobile app')
|
693
814
|
```
|
694
815
|
|
816
|
+
### Personal Access Tokens
|
817
|
+
|
818
|
+
Retrieving all personal access tokens:
|
819
|
+
|
820
|
+
```ruby
|
821
|
+
tokens = client.personal_access_tokens.all
|
822
|
+
```
|
823
|
+
|
824
|
+
Retrieving one personal access token by ID:
|
825
|
+
|
826
|
+
```ruby
|
827
|
+
token = client.personal_access_tokens.find(token_id)
|
828
|
+
```
|
829
|
+
|
830
|
+
Creating a personal access token:
|
831
|
+
|
832
|
+
```ruby
|
833
|
+
client.personal_access_tokens.create(name: 'foobar key', scopes: ['content_management_manage'])
|
834
|
+
```
|
835
|
+
|
836
|
+
Revoking a personal access token:
|
837
|
+
|
838
|
+
```ruby
|
839
|
+
token.revoke
|
840
|
+
```
|
841
|
+
|
695
842
|
### Editor Interface
|
696
843
|
|
697
844
|
Retrieving editor interface for a content type:
|
@@ -700,26 +847,40 @@ Retrieving editor interface for a content type:
|
|
700
847
|
blog_post_editor_interface = blog_post_content_type.editor_interface.default
|
701
848
|
```
|
702
849
|
|
703
|
-
You can call the EditorInterface API from any level within the
|
704
|
-
pass the
|
850
|
+
You can call the EditorInterface API from any level within the content model hierarchy, take into account that you'll need to
|
851
|
+
pass the IDs of the levels below it.
|
705
852
|
|
706
853
|
> Hierarchy is as follows:
|
707
854
|
> `No Object -> Space -> ContentType -> EditorInterface`
|
708
855
|
|
709
|
-
### Snapshots
|
856
|
+
### Entry Snapshots
|
710
857
|
|
711
|
-
Retrieving all
|
858
|
+
Retrieving all snapshots for a given entry:
|
712
859
|
|
713
860
|
```ruby
|
714
861
|
snapshots = entry.snapshots.all
|
715
862
|
```
|
716
863
|
|
717
|
-
Retrieving a
|
864
|
+
Retrieving a snapshot for a given entry:
|
718
865
|
|
719
866
|
```ruby
|
720
867
|
snapshot = entry.snapshots.find('some_snapshot_id')
|
721
868
|
```
|
722
869
|
|
870
|
+
### Content Type Snapshots
|
871
|
+
|
872
|
+
Retrieving all snapshots for a given content type:
|
873
|
+
|
874
|
+
```ruby
|
875
|
+
snapshots = content_type.snapshots.all
|
876
|
+
```
|
877
|
+
|
878
|
+
Retrieving a snapshot for a given content type:
|
879
|
+
|
880
|
+
```ruby
|
881
|
+
snapshot = content_type.snapshots.find('some_snapshot_id')
|
882
|
+
```
|
883
|
+
|
723
884
|
### Pagination
|
724
885
|
|
725
886
|
```ruby
|
@@ -757,33 +918,40 @@ client = Contentful::Management::Client.new('access_token', raise_errors: true)
|
|
757
918
|
|
758
919
|
### Content Type Cache
|
759
920
|
|
760
|
-
This allows for fetching
|
761
|
-
To enable this, in your
|
921
|
+
This allows for fetching content types for your space at client instantiation time, which prevents extra requests per entry.
|
922
|
+
To enable this, in your client instantiation do:
|
762
923
|
|
763
924
|
```ruby
|
764
925
|
client = Contentful::Management::Client.new(token, dynamic_entries: ['my_space_id'])
|
765
926
|
```
|
766
927
|
|
767
|
-
You can enable the
|
928
|
+
You can enable the cache for as many spaces as you want. If no space is added, content types will be fetched upon space find.
|
929
|
+
|
930
|
+
To completely disable this feature, upon client instantiation do:
|
931
|
+
|
932
|
+
```ruby
|
933
|
+
client = Contentful::Management::Client.new(token, disable_content_type_caching: true)
|
934
|
+
```
|
768
935
|
|
769
936
|
### Proxy Support
|
770
937
|
|
771
938
|
This allows for using the CMA SDK through a proxy, for this, your proxy must support HTTPS and your server must have a valid signed certificate.
|
772
939
|
|
773
|
-
To enable this, in your
|
940
|
+
To enable this, in your client instantiation do:
|
941
|
+
|
774
942
|
|
775
943
|
```ruby
|
776
944
|
PROXY_HOST = 'localhost'
|
777
945
|
PROXY_PORT = 8888
|
778
946
|
|
779
|
-
# Just
|
947
|
+
# Just host/port
|
780
948
|
client = Contributing::Management::Client.new(
|
781
949
|
token,
|
782
950
|
proxy_host: PROXY_HOST,
|
783
951
|
proxy_port: PROXY_PORT
|
784
952
|
)
|
785
953
|
|
786
|
-
# With
|
954
|
+
# With username/password
|
787
955
|
client = Contributing::Management::Client.new(
|
788
956
|
token,
|
789
957
|
proxy_host: PROXY_HOST,
|
@@ -793,7 +961,7 @@ client = Contributing::Management::Client.new(
|
|
793
961
|
)
|
794
962
|
```
|
795
963
|
|
796
|
-
# Rate
|
964
|
+
# Rate limit management
|
797
965
|
|
798
966
|
With the following configuration options you can handle how rate limits are handled within your applications.
|
799
967
|
|