I’ve created my first gem in Profitwell API wrapper https://github.com/eebasadre20/profitwell. I like to get some suggestions, remark, or suggestion on the code construction, technique implementations, and so forth.
I’m extra involved in my code construction like how I structured to deal with the module and sophistication, the request-response dealing with, error dealing with, and parameters dealing with.
Right here is among the examples of my useful resource:
module Profitwell
class Plans
embody Consumer
def all
request(
"get",
resource_path("plans")
)
finish
def discover(plan_id)
request(
"get",
resource_path("plans/#{plan_id}")
)
finish
def create(params = {})
request(
"submit",
resource_path("plans"),
choices: params
)
finish
def replace(plan_id, params = {})
request(
"put",
resource_path("plans/#{plan_id}"),
choices: params
)
finish
finish
finish
I’d be more than happy in the event you give me some suggestions relating to the code construction and implementation – Profitwell API Wrapper
Everyone seems to be welcome to share your concept and contribute to this easy mission.