Project

newegg-api

0.01
No commit activity in last 3 years
No release in over 3 years
this gem allows the usage of the newegg.com api to ascertain product information.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.6
~> 1.3
~> 10.0.4
~> 2.11

Runtime

~> 0.8
~> 1.7
 Project Readme

Newegg Api Gem

A Ruby Wrapper for the Newegg Mobile API

Build Status Coverage Status Gem Version

Installation

Add this line to your application's Gemfile:

gem 'newegg-api'

And then execute:

$ bundle install

Lastly, require the gem as such:

require 'newegg'

Usage

Obtain Store Information

Newegg.stores #=> Array<Newegg::Store>
Newegg::Store #=> Class Instance Variables
title,				# store title
store_department,	# store department name
store_id,			# store id
show_see_all_deals,	# boolean if store contains deals
categories			# array of category ids

Obtain Categories for a Store

Newegg.categories(store_id) #=> Array<Newegg::Category>
Newegg::Category #=> Class Instance Variables 
description, 		# description of the returned Category 
category_type,		# category type
category_id,		# category id
store_id,			# store id
show_see_all_deals,	# boolean if category contains deals
node_id				# node id

Navigate through Categories

Newegg.navigate(store_id, category_id, node_id) #=> Array<Newegg::Category>

Search for Products (all arguments optional)

Newegg.search(store_id: STORE_ID, category_id: CAT_ID, sub_category_id: SUB_CAT_ID, node_id: NODE_ID, page_number: 1, sort: "FEATURED", keywords: KEYWORDS) #=> json
{
	"NavigationContentList" => [
	{"TitleItem" => {"Description" => "Useful Links",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Price",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Manufacturer",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Type",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Color",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Case Material",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "With Power Supply",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Power Supply",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "With Side Panel Window",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "External 5.25\" Drive Bays",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "External 3.5\" Drive Bays",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Power Supply Mounted",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Internal 3.5\" Drive Bays",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Front Ports",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "80mm Fans",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "120mm Fans",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "250mm Fans",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Side Air duct",  "NavigationItemList" => [{...}]},
	{"TitleItem" => {"Description" => "Expansion Slots", "NavigationItemList" => [{...}]}
	],

	"RelatedLinkList" => nil,

	"CoremetricsInfo" => {"CategoryID" => "2010090007", ...}

	"IsAllComboBundle" => false,
	"CanBeCompare" => true,
	"MasterComboStoreId" => 0,
	"SubCategoryId" => 7,
	"HasDeactivatedItems" => false,
	"HasHasSimilarItems" => false,
	"SearchProvider" => 0,
	"SearchResultType" => 0,
	"ProductListItems" => [
	{"Title" => "Antec Three Hundred Illusion Black Steel ATX Mid Tower Computer Case", ...},
	{"Title" => "COOLER MASTER HAF X RC-942-KKN1 Black Steel/ Plastic ATX Full Tower Computer Case", ...}
	{"Title" => "Thermaltake VL84301W2Z V3 Black Edition with 430W  Power Supply ATX Mid Tower Computer Case", ...}
	],
	"PaginationInfo" => {"TotalCount" => 572,
	"PageSize" => 20,
	"PageNumber" => 1,
	"PageCount" => 0}
}

Retrieve Product Specifications

Newegg.specifications(item_number) 
{
	"NeweggItemNumber": "N82E16811147107",
	"Title": "Rosewill BLACKHAWK Gaming ATX Mid Tower Computer Case, come with Five Fans, window side panel, top HDD dock ",
	"SpecificationGroupList": [
	{
		"GroupName": "Model", "SpecificationPairList":
		[{"Key": "Brand", "Value": "Rosewill"},
		{"Key": "Model","Value": "BlackHawk"}]
	}
	{"GroupName": "Spec", "SpecificationPairList": [{..}]},
	{"GroupName": "Expansion", "SpecificationPairList": [{..}]},
	{"GroupName": "Front Ports", "SpecificationPairList": [{..}]},
	{"GroupName": "Cooling System", "SpecificationPairList": [{..}]},
	{"GroupName": "Physical Spec", "SpecificationPairList": [{..}]},
	{"GroupName": "Features", "SpecificationPairList": [{..}]},
	]
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request