My first Open Source library
Francesco Pigozzi

Francesco Pigozzi @pigozzifr

About: I'm an Italian Software Engineer based in Bologna. I'm obsessed with performances and User Experience oriented products.

Location:
Bologna, Italy
Joined:
Mar 6, 2019

My first Open Source library

Publish Date: Jan 25 '21
30 13

Thanks to Lisheng Chang @changlisheng for making this photo available freely on Unsplash 🎁

Long story short

It all started as a pet project, I know you understand me.

But rapidly it became more like a developer need: to have something that works as you want it to, something you could share with other developers and be proud of it because, damn, you’ve just became part of an amazing ecosystem called Open Source!

I was finding myself in the need of using the plain JS SDK of Amazon’s Product Advertising API, link here, but it was barely usable, with a lot of conventions, zero explicitness and a whole set of unreadable code.

Maybe it’s just me but in the past year I’ve started to appreciate when you jump into a project and you can understand easily how things get passed around. I needed Typescript.

There was little to no libraries as I expect them to be and finally I came to one conclusion: I needed to do it myself.

And I did it! 👇⭐️

GitHub logo Pigotz / paapi5-typescript-sdk

TypeScript SDK for Product Advertising API 5.0

paapi5-typescript-sdk

Unofficial TypeScript SDK for Product Advertising API 5.0

Installation

In order to install this SDK, you just have to run you well-known npm or yarn scripts:

npm i -S paapi5-typescript-sdk
Enter fullscreen mode Exit fullscreen mode

Or

yarn add paapi5-typescript-sdk
Enter fullscreen mode Exit fullscreen mode

And there you go! Enjoy 😎

API

Everything is exported from the SDK: requests' classes, models, utility types, helper and so on..

If you want to import everything

import * as SDK from 'paapi5-typescript-sdk';
Enter fullscreen mode Exit fullscreen mode

And use what you need later

const request = new SDK.SearchItemsRequest(/* ... */);
Enter fullscreen mode Exit fullscreen mode

You can refer to the Amazon Product Advertising API 5.0 for further details about every request

Auth

In order to validate all the requests against the APIs, I've implemented almost from scratch the AWS V4 signing process, creating the SignHelper class.

This is intended for interal use, but if you want to use it for other purposes, here you can…

Honest work meme

I need feedback 🙆‍♂️

This is a small project but a whole set of TS is involved and needs to be maintained ⚙️

This is my first time being the author of an Open Source repository so any feedback and proposal is welcome 🙏

If you are just lazy, leave a GitHub ⭐️ and a 🦄 here, it would be enough for me!

Thanks for reading!

Comments 13 total

  • Harshil Parmar
    Harshil ParmarJan 25, 2021

    Great, 💥 I am also thinking to make an open-source project.
    It would be great if you provide some guidance related to that.

    • Francesco Pigozzi
      Francesco PigozziJan 25, 2021

      Do you mean some guidance related to Open Source? 🙆‍♂️ Or specifically to my project?

      • Harshil Parmar
        Harshil ParmarJan 25, 2021

        More about how to make an open-source library? How to think in that way? Sorry, I forgot to mention 😃

        • rxliuli
          rxliuliJan 25, 2021

          If you plan to make a JavaScript open source library, you can use rollup, but if you need a complete guide, then some Google articles may work. Moreover, modern front-end open source libraries generally use TypeScript and Lerna

    • 𒎏Wii 🏳️‍⚧️
      𒎏Wii 🏳️‍⚧️Jan 25, 2021

      Slap an MIT license on your project and push it to github. The rest is just telling people you know about it and waiting if people find it useful.

      There's nothing hard about open source nor anything you need to know: It's just about sharing.

    • Francesco Pigozzi
      Francesco PigozziJan 25, 2021

      I personally agree with all the other advice!

      I just want to add one more little thing: start from the little things like

      • contributing to the docs
      • opening GitHub issues in a proactive way, not by just pasting some logs and asking for help
      • contributing to RFCs
      • commenting, reacting, commentig and reacting again on PRs of your interest

      I hope to have been helpful 🙆‍♂️

  • Tobias Nickel
    Tobias NickelJan 25, 2021

    good job 👍

    looks to me like you are working for free for Amazon. should't Jeff Bezos make sure the SDK is as easy to use as pissible?

    • Francesco Pigozzi
      Francesco PigozziJan 25, 2021

      I’m waiting for a message of thanks from him directly 😎

  • Luke Rogers
    Luke RogersJan 30, 2021

    I have a project that i want to work on open source but i'm worried about my intellectual property being stolen as i have not copyrighted the idea. Can someone explain how i can still go ahead with it using people to help me build the project?

    • Rafael Acioly
      Rafael AciolyJan 30, 2021

      I'm sorry but you can't ask for help on a private repository and expect people to help for free :(

      Open source is a two way street, if you want help for free you have to offer something for free as well.

Add comment