
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Ruby 7netshopping API using Nokogiri. Uses Response and Element wrapper classes for easy access to the REST API XML output.
Add this line to your application's Gemfile:
gem 'sevennet-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sevennet-api
require 'sevennet/api'
Sevennet::Api.configure do |options|
options[:ApiUserId] = 'your api user id'
options[:APISecretKey] = 'your api secret key'
end
# GetShoppingCategory
res = Sevennet::Api.get_shopping_category('') # root category
res = Sevennet::Api.get_shopping_category('books') # books category
res.categories.each do |category|
children = category.get_elements('ChildCategory')
children.each do |child|
code = child.get('CategoryCode')
...
end
end
# SearchProduct
res = Sevennet::Api.search_product('ruby', {:ShoppingSortOrder => 'reviews'}) # keyword match
res = Sevennet::Api.search_product('', {:CategoryCode = 'books'}) # category match
res = Sevennet::Api.search_product('ruby', {:CategoryCode = 'books'}) # keyword and category match
res.products.each do |product|
code = product.get('ProductCode')
...
end
# SearchRanking
res = Sevennet::Api.search_ranking('books', {:GenerationCond => 10, :SexCond => 'male'})
res.products.each do |product|
code = product.get('ProductCode')
...
end
# SearchProductReview
res = Sevennet::Api.search_product_review('2110150300') # ProductCode
res = Sevennet::Api.search_product_review('21-101-503-00',:type => 'ProductStandardCode') # ISBN JAN etc
res.reviews.each do |review|
title = review.get('CommentTitle')
...
end
# GetSpcCategory
res = Sevennet::Api.get_spc_category('') # root category
res = Sevennet::Api.get_spc_category('home') # home category
res.categories.each do |category|
children = category.get_elements('ChildCategory')
next if children.nil?
children.each do |child|
code = child.get('CategoryCode')
...
end
end
# SearchSpcShop
res = Sevennet::Api.search_spc_shop('', {:SpcSortOrder => 'name') # all
res = Sevennet::Api.search_spc_shop('ruby', {:SpcSortOrder => 'name') # keyword match
res.shops.each do |shop|
id = shop.get('SpcShopId')
...
end
# some common response object methods
res.has_error? # return true if there is an error
res.error # return error message if there is any
res.total_amount # return total results
# Extend Sevennet::Api, replace 'other_operation' with the appropriate name
module Sevennet
class Api
def self.other_operation(item_id, opts={})
opts[:operation] = '[other valid operation supported by 7netshopping API]'
# setting default option value
opts[:item_id] = item_id
self.send_request(opts)
end
end
end
Sevennet::Api.other_operation('[item_id]', :param1 => 'abc', :param2 => 'xyz')
Refer to 7netshopping API documentation for more information on other valid operations, request parameters and the XML response output: http://www.7netshopping.jp/
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that sevennet-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.