Projects API implementation into the PHP Client for Makerlog
As I already mentioned, I develop the PHP client for Makerlog in my spare time. Makerlog is the dead-simple task log that helps you stay productive and ship faster. There you can meet other makers and share your progress.
Today I finished the Projects API and laid the groundwork for the Products API.
Repository
- https://github.com/pcsg/pcsg-makerlog-php-client
- Licence: GPL-3.0+
New Features
What feature(s) did you add?
- I implemented the Projects API.
/projects/
GET, POST/projects/{id]/
GET, PATCH, DELETE/projects/{id}/related/
How did you implement it/them?
The implementation is done with the following commits
In addition, I have written a basic documentation.
Again I give a small overview how the two new objects Project and Porjects can be used. Basically, I stuck to the other API, so similarities are not surprising.
As mentioned above, there are two new objects
- Projects
- Project
Projects in Makerlog are more like hashtags for products. Unfortunately the naming is a bit confusing but since I write a client for the network, I prefer to stick to the names of the respective network and don't introduce any more names.
How to get the main Projects Object
The main Projects object is directly available via the makerlog client
Create a project
To create a new project, you must use the projects object.
Get a project
A single project can be received via its id
With a normal project which has been received via get(), no operations can be executed. If you want to change the project, you should get a project object. This can be done via getProjectAsObject().
A project object has several getter methods, so it is quite easy to access the data of the project.
Change a project
After creating a project it is possible to change or delete the project.
GitHub Account
- https://github.com/dehenne
Of course you can find all examples in the new projects documentation as well.
With the changes and features of today it is now possible to create, read, update and delete projects. In the coming days the product API for which you need the Projects API will be integrated.
Have fun in Makerlog and thanks for reading, Hen