You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,37 @@ Drupal.org API Component
3
3
4
4
Drupal.org provides a public API for retrieving common data includes all node types, users, comments and more. You can find documentation on that here: https://www.drupal.org/api
5
5
6
+
Setup with composer
7
+
===================
8
+
9
+
Run `composer init` but do not use its interactive require. Next edit composer.json and add
This SDK provides a simple PHP layer for interacting with Drupal.org's API. Currently it supports Users and Nodes with special handling for Project Issue & Page Nodes.
10
29
11
30
Getting a new DrupalClient class is typically done through the static DrupalClient::create() method.
12
31
13
32
```php
14
33
<?php
15
34
35
+
require __DIR__ . '/vendor/autoload.php';
36
+
16
37
use EclipseGc\DrupalOrg\Api\DrupalClient;
17
38
18
39
$client = DrupalClient::create();
@@ -25,6 +46,8 @@ This will provide you a fully instantiated DrupalClient that will return data ob
25
46
```php
26
47
<?php
27
48
49
+
require __DIR__ . '/vendor/autoload.php';
50
+
28
51
use EclipseGc\DrupalOrg\Api\DrupalClient;
29
52
30
53
$client = DrupalClient::create();
@@ -41,6 +64,8 @@ Retrieving Nodes is equally straight-forward:
41
64
```php
42
65
<?php
43
66
67
+
require __DIR__ . '/vendor/autoload.php';
68
+
44
69
use EclipseGc\DrupalOrg\Api\DrupalClient;
45
70
46
71
$client = DrupalClient::create();
@@ -55,6 +80,8 @@ What's nice about this though is that the returns are all object which can be ch
0 commit comments