Skip to content

Simple rails plugin for get products from tokopedia

License

Notifications You must be signed in to change notification settings

askareija/tokopediaapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokopediaApi

This plugin is still in pre-alpha version and has not been released and is still in the development stage.

A simple rails plugin to get products information from tokopedia.

Usage

require 'tokopedia_api'

Get Product from url

TokopediaApi.get_product(url)

example : TokopediaApi.get_product("https://www.tokopedia.com/gandante/asus-strix-rog-gaming-gl553vd-i7-w-gtx-1050-4-gb")
the result will return a Hash class :

{:shop_id=>"440608", :product_id=>"173268998", :product_name=>"Asus STRIX ROG Gaming GL553VD i7 w/ GTX 1050 4 GB", :product_image=>"https://ecs7.tokopedia.net/img/cache/700/product-1/2017/12/25/173268998/173268998_7fcf9c49-3711-4562-ad05-b6d079cce7cd_2048_0.jpg", :product_link=>"https://www.tokopedia.com/gandante/asus-strix-rog-gaming-gl553vd-i7-w-gtx-1050-4-gb", :product_price=>"12999000", :product_desc=>"Assallamuallaikum Agan2 dan Sista2 , Kembali nih Ane Rizqi Dari GanDanteStore Mau jual Laptop High-End, Check It Out...  Asus STRIX ROG Gaming GL553VD  - Processor : Intel Core i7-7700 HQ 3.8 GHz - Memory : 8 GB DDR4 - Graphic : NVIDIA GeForce GDDR5X 1050 4 GB Dedicated  - Storage :  1 TB 7200 RPM HDD - Display : 15.6\" Full HD IPS Wide-View Anti-Glare Matte - Connectivity : 3x USB 3.0 SuperSpeed, HDMI, headphone / mic combo jack, 802.11a/g/n WLAN, Bluetooth 4.0, Gigabyte Ethernet Mbps, Card Reader - Audio : ASUS ROG AudioWizard Rp. 12.999.000, -  Kondisi : - Like New 99 %  - RGB + NumPad Keyboard  - Silent Cooling System - Garansi 2 Thn ASUS Resmi Sampai 2019 - BONUS : Game2 Terbaru + Softwares + Movies By Request Kelengkapan : - Laptop + Charger Original Note : - Barang ORIGINAL 100 % - Silahkan Kontak Saya untuk Konsultasi - Bisa COD Bandung - Total Harga dan Berat Barang sudah termasuk Biaya Ongkir, Paking Kayu, Bubble Warp, Asuransi serta Biaya Kurir & Jasa LINE : RIZQIDANTE FB FansPage : GanDanteStore IG : GanDanteStore Wesbite : www*GanDanteStore*com  Terimakasih TokoPedia Wassallamuallaikum Wr.Wb.", :product_weight_kg=>"20.00", :menu_id=>"1241306", :menu_name=>"Laptop", :menu_url=>"https://www.tokopedia.com/gandante/etalase/laptop-1"}

Hash parameters

shop_id Return the shop ID
product_id Return the product ID
product_name Return the product name
product_image Return the product image link
product_link Return the product link on tokopedia website
product_price Return the price of the product
product_desc Return the description of the product
product_weight_kg Return the weight of the product in kilograms
menu_id Return the menu ID (etalase)
menu_name Return the menu name (etalase name)
menu_url Return the url of the menu (etalase url)

Installation

Add this line to your application's Gemfile:

gem 'tokopedia_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tokopedia_api

Contributing

You can contribute to this project to make it better, just ask me

License

Created by Megumi Aliya © 2018 The gem is available as open source under the terms of the MIT License.

About

Simple rails plugin for get products from tokopedia

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published