Advertisement:

Author Topic: OsClass API Wrapper Plugin  (Read 1432 times)

xhezairi

  • Newbie
  • *
  • Posts: 10
  • www.shitesot.com
OsClass API Wrapper Plugin
« on: January 04, 2018, 08:22:08 pm »
Howdy folks,

I'm afraid this may come out as a plug, though it might be, but that's not my intention at all.
I'm just super excited to share this progress with you all.

In the past six months we've been hard at work to create an Android app for our OsClass powered site www.shitesot.com
The one thing that Osclass lacks is a decent API that would spit out JSON data for its content. We understood the need and saw different approaches to this problem, finally decided to create a Osclass plugin that would serve as API wrapper, so that we could serve different parts of our app's functionality to fulfill its needs.

Today I'm super excited to let you know that our (FREE) app ShiteSot is finally on Google Play Store (https://play.google.com/store/apps/details?id=com.poentalabs.shitesot) and communicates super fast with the backend powered by Osclass and consumes JSON data prepared and served by our Osclass API plugin.

You can take a quick look at one of the responses here http://www.shitesot.com/api/home/main/json



Due to the nature of how Osclass' code is structured, there were times when we were forced to simply take boilerplate code and remove certain parts (i.e. redirects after item is posted and/or user logged in) in order to try and enforce a proper API communication, but generally a lot of functionality is ported to simply return JSON data.

As a quick overview we've made controllers for Categories, Locations, Items and Users, and tried our best to keep code organized based on context, the result of which I can say it's pleasing so far.

Thank you for keeping Osclass and its community alive. We've learned to love its potential and hopefully we'll be giving back to it soon.

Regards,
Arian

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: OsClass API Wrapper Plugin
« Reply #1 on: January 04, 2018, 08:42:28 pm »
Nice job.
I couldn't understand the need of an app when you have a good mobile friendly website... I mean...why install an app that requires permissions in your phone when you can bookmark the website and that's it.
Is it reducing server load or something?

xhezairi

  • Newbie
  • *
  • Posts: 10
  • www.shitesot.com
Re: OsClass API Wrapper Plugin
« Reply #2 on: January 05, 2018, 01:45:06 am »
Hi marius-ciclistu,

Good that you mention server load, that’s something that came  as a side benefit, but our primary incentive to make an app is because we are in the process of extending ShiteSot to something more than ad listings, hence the Android app is the first step in that direction.

Besides, diving into the Mobile world feels like an “Alice in Wonderland” experience altogether, and only the sky’s the limit to what can be achieved.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: OsClass API Wrapper Plugin
« Reply #3 on: January 05, 2018, 02:38:41 am »
If lower server load is one of the benefits of using apps instead of a browser, than I can understand the need for it.

If not...from the user's point of view in osclass' regard I see no advantage because osclass doesn't deal with messages between users so the app's advantage of alerting you when you got a new message, just like a phone app for mail does, is not there.

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: OsClass API Wrapper Plugin
« Reply #4 on: January 05, 2018, 12:13:46 pm »
Hi there,

Good initiative :)

However you should know that right now you are exposing some sensitive information related at least to your items.

http://www.shitesot.com/api/home/main/json

You "json api" is exposing s_secret value, with this value a malicious user can edit/delete any listing knowing his s_secret.

You should not share this kind of sensitive information through your api.

Best regards

xhezairi

  • Newbie
  • *
  • Posts: 10
  • www.shitesot.com
Re: OsClass API Wrapper Plugin
« Reply #5 on: January 05, 2018, 05:54:03 pm »
@marius-ciclistu like I said in my previous comment, it wasn't about decreasing sever load, rather more in line with where our platform shitesot.com is heading to moving forward. I've been creating Web Sites and Applications for fourteen years now, and as much as it saddens me to acknowledge this, websites are a vanishing concept as everything is shifted towards Web Services and Mobile, so whether responsive or not, it doesn't really matter much these days. 93.7% of our users are browsing our site through their mobile devices, and that's the main incentive behind all of this road we took upon ourselves. Thanks for your feedback nevertheless.

@garciademarina thanks for spotting that out. I paid attention to hiding sensitive fields with the Users data, but seemed to have neglected on the secret value for items. Will be taken care immediately tho, thanks a lot!

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: OsClass API Wrapper Plugin
« Reply #6 on: January 05, 2018, 06:20:55 pm »
You are right:) but I would chose to use a browser instead of an app.
Best of luck with your platform ;)

EDIT.
If you access the website via computer with do not track enabled in your browser, google analytics doesn't count that visit. So it's normal that over 90% are mobile visits:)

Correct me if I'm wrong:)
« Last Edit: January 06, 2018, 12:31:35 am by marius-ciclistu »

ala

  • Full Member
  • ***
  • Posts: 213
Re: OsClass API Wrapper Plugin
« Reply #7 on: January 08, 2018, 10:49:28 am »
@xhezairi  CAN YOU SHARE API plugin

regard

SteveJohnson

  • Sr. Member
  • ****
  • Posts: 328
  • Golden tip - Clear your cache :|
Re: OsClass API Wrapper Plugin
« Reply #8 on: January 09, 2018, 08:26:22 pm »
Good job, it looks very nice.

Instead of saying "WHY have you made a mobile app rather than a responsive website" , i think it's commendable to take a step and trying something innovative.

I hope someday we will see an API for osclass core for everyone to use.

Cheers!

xhezairi

  • Newbie
  • *
  • Posts: 10
  • www.shitesot.com
Re: OsClass API Wrapper Plugin
« Reply #9 on: February 23, 2018, 01:24:59 am »
Good job, it looks very nice.

Instead of saying "WHY have you made a mobile app rather than a responsive website" , i think it's commendable to take a step and trying something innovative.

I hope someday we will see an API for osclass core for everyone to use.

Cheers!

Thanks a lot Steve, much appreciated!

omid_firoznia

  • Newbie
  • *
  • Posts: 37
Re: OsClass API Wrapper Plugin
« Reply #10 on: February 10, 2019, 05:32:11 pm »
Hi

i'm interested in API too , is there any complete api that can be use ?