Product API implementation into the PHP Client for Makerlog

@dehenne · 2019-03-20 17:43 · utopian-io

Product API implementation into the PHP Client for Makerlog

As already mentioned in the last posts, 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.

The last days I finished the Product API and integrated an undocumented search of tasks.

Repository

  • https://github.com/pcsg/pcsg-makerlog-php-client
  • Licence: GPL-3.0+

New Features

What feature(s) did you add?

  • I implemented the product API.
  • `/products/ GET, POST
  • /products/{slug}/ GET, PATCH, DELETE
  • /products/{slug}/leave/
  • /products/{slug}/people/
  • /products/{slug}/projects/
  • /products/{slug}/stats/
  • I implemented the tasks search API
  • /search/tasks/?q=

How did you implement it/them?

The implementation is done with the following commits

Products

Task Search

Like in the last posts, I will go into the API a little bit. The complete API documentation is available under: https://github.com/pcsg/pcsg-makerlog-php-client/blob/master/docs/products.md

Products

The first thing you want to do, of course, is create a product. You have to know that some things are necessary for a product. For example, every product must have a project. Since I found this very annoying at the product creation, I automated the creation of an associated project.

Of course you can also create a project yourself and assign it to the product, that's no problem.

The easiest way to create a product is the following way:

1.png

This example creates a product and the first project is created from the name of the product.

However, if you want to create a product and already have a project, you can also pass this on.

2.png

In the complete API I have tried to ensure continuity. Therefore the getting of a product is as easy as the getting of a task or a project.

3.png

One of the most beautiful features that have been added to Makerlog in the last weeks is the team building. It is now possible to assign other users to your product since one or two weeks. With the API client this is very easy to implement.

4.png

If you want to work with the product or to read different data from it, you should take a look at all the getter methods.

5.png

Task search

As a little goodie, I got a task request if I can integrate the task search API. This API is not documented but the basic usage is now built in. I don't know if there are other parameters at the moment, but this will be clarified in the next days.

6.png

GitHub Account

  • https://github.com/dehenne
Future

The goal for the first version is next week at the latest. For version 1.0 the user API is still missing, which I have to check but it is 50% ready and should be usable in the next days. After that I will introduce a dozen php unit tests to make the client stable.

That was it for today already, I hope I could give a little insight into the PHP client of Makerlog.

Have fun in Makerlog and thanks for reading, Hen

#utopian-io #development
Payout: 0.000 HBD
Votes: 154
More interactions (upvote, reblog, reply) coming soon.