Product API implementation into the PHP Client for Makerlog

2년 전

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

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

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
STEEMKR.COM IS SPONSORED BY
ADVERTISEMENT
Sort Order:  trending

Thank you for your contribution. You probably want to take a look at Rest API Design.

  1. this line seems duplicate.
  2. Your getProductData has been called in its many APIs to get the sub-field which may be cached.
  3. The getData and many other APIs has a long chain in getting its field data, which may throw exception e.g. null pointer. The try-catch will hide the errors and prevent early identification of the risks - which is generally a bad idea.
  4. When performing addUserToTheTeam, have you thought about multiple requests i.e. race conditions?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

·

Thank you for your review, @justyy! Keep up the good work!

Congratulations @dehenne! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 40 posts. Your next target is to reach 50 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

Carnival Challenge - Here are the winners
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Hi @dehenne!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @dehenne!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Congratulations @dehenne! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!