Added getting started and authentication page#224
Added getting started and authentication page#224MutiatBash wants to merge 14 commits intomautic:5.xfrom
Conversation
RCheesley
left a comment
There was a problem hiding this comment.
Thanks for the PR @MutiatBash - I've made a few comments but proper reviewing is blocked by #225 which is required to unblock building locally. I'm also noticing that Vale isn't checking this page correctly so we might need to check that, too.
RCheesley
left a comment
There was a problem hiding this comment.
@MutiatBash a small Vale fix here, too.
|
@RCheesley .....I've made the suggested changes, can you review them |
RCheesley
left a comment
There was a problem hiding this comment.
Thanks for the great work @MutiatBash - just a few small tweaks to fix then it should be good to merge!
|
Hi @MutiatBash give us a shout when you're ready for a re-review - it's helpful if you can mark the conversation resolved once you fix each item. Thanks! |
RCheesley
left a comment
There was a problem hiding this comment.
Couple of small points to address with this one.
|
When this goes to 7 let's ensure we add an admonition about API v2 on the getting started page. Also, can we ensure this is first in the TOC, or near the top? |
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
|
@mautic/core-team I'd like to confirm some things. Getting startedThe "Getting started" page in this PR is combinations of the below legacies: There's one thing here:
Here's the link to the live preview: https://mautic-developer--224.org.readthedocs.build/en/224/rest_api/getting_started.html AuthenticationThe "Authentication" page in this PR is combinations of the below legacies: There are several things here:
Here's the link to the live preview: https://mautic-developer--224.org.readthedocs.build/en/224/rest_api/authentication.html TIA! ✨ |
| .. code-block:: php | ||
|
|
||
| <?php | ||
|
|
||
| use GuzzleHttp\Client; | ||
| use Mautic\Auth\ApiAuth; | ||
| use Mautic\MauticApi; | ||
|
|
||
| // Initiate an HTTP Client | ||
| $httpClient = new Client([ | ||
| 'timeout' => 10, | ||
| ]); | ||
|
|
||
| // Initiate the auth object | ||
| $settings = [ | ||
| 'userName' => 'YOUR_USERNAME', | ||
| 'password' => 'YOUR_PASSWORD' | ||
| ]; | ||
| $apiUrl = 'https://mautic.example.com'; | ||
|
|
||
| $initAuth = new ApiAuth($httpClient); | ||
| $auth = $initAuth->newAuth($settings, 'BasicAuth'); | ||
|
|
||
| $api = new MauticApi(); | ||
| $contactsApi = $api->newApi('contacts', $auth, $apiUrl); | ||
| $contacts = $contactsApi->getList(); |
There was a problem hiding this comment.
@mautic/core-team I don't see this code-block anywhere in the legacy docs. Is this valid?
There was a problem hiding this comment.
I think we can just link to https://github.com/mautic/api-library?tab=readme-ov-file#installing-the-api-library which will always have the up to date example?

No description provided.