API software for personal Lego business
Budget: $30 – $250 AUD
Looking for an experienced developer to create API software for my personal Lego business. The main purpose of the API software is to provide price checking and cross referencing functionality.
I am open to different types of API integration, but have not yet determined my preference. The programming language for the API is also undetermined.
Ideal skills for this project would include:
- Proficiency in API development and integration
- Experience with multiple API integration types
- Knowledge of Python, JavaScript, and PHP programming languages
If you have experience in API development and are able to provide recommendations for API integration and programming language, please apply for this project.
I have some information from chat gtp but I am not that experienced with software development. And this is the question I asked.
Can you design code for the following using api
1. Check prices of Lego sets on Amazon AU in a given price range.
2. With the Lego sets found in the given price range use their Lego id number to find the part out price on bricklink using the 6 month average sale pricing
3. Show the difference between the Amazon price and the bricklink part out price as a percentage for all Lego sets searched in descending order
import os
import requests
import xml.etree.ElementTree as ET
# Amazon API credentials
AMAZON_ACCESS_KEY = 'your_access_key'
AMAZON_SECRET_KEY = 'your_secret_key'
AMAZON_ASSOCIATE_TAG = 'your_associate_tag'
# BrickLink API credentials
BRICKLINK_API_KEY = 'your_api_key'
BRICKLINK_API_TOKEN = 'your_api_token'
# Price range to search on Amazon
min_price = 10
max_price = 50
# Search for LEGO sets on Amazon AU within the price range
amazon_api_url = 'https://webservices.amazon.com.au/onca/xml'
amazon_params = {
'Service': 'AWSECommerceService',
'Operation': 'ItemSearch',
'AssociateTag': AMAZON_ASSOCIATE_TAG,
'SearchIndex': 'Toys',
'Keywords': 'lego',
'MinimumPrice': min_price,
'MaximumPrice': max_price,
'Availability': 'Available',
'ResponseGroup': 'Images,ItemAttributes',
'MerchantId': 'All'
}
amazon_response = requests.get(amazon_api_url, params=amazon_params)
amazon_xml = ET.fromstring(amazon_response.text)
# Parse the Amazon XML response and retrieve ASINs of the LEGO sets found
asins = []
for item in amazon_xml.iter('{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Item'):
asin = item.find('{http://webservices.amazon.com/AWSECommerceService/2011-08-01}ASIN').text
asins.append(asin)
# Retrieve the part-out value of each LEGO set on BrickLink
bricklink_api_url = 'https://api.bricklink.com/api/store/v1/items/part-out-value'
headers = {
'Authorization': f'Bearer {BRICKLINK_API_TOKEN}',
'Content-Type': 'application/json',
'User-Agent': 'MyApp/1.0'
}
part_out_values = []
for asin in asins:
# Retrieve the LEGO ID of the set from Amazon Product Advertising API
amazon_api_url = 'https://webservices.amazon.com.au/onca/xml'
amazon_params = {
'Service': 'AWSECommerceService',
'Operation': 'ItemLookup',
'AssociateTag': AMAZON_ASSOCIATE_TAG,
'ItemId': asin,
'ResponseGroup': 'ItemAttributes'
}
amazon_response = requests.get(amazon_api_url, params=amazon_params)
amazon_xml = ET.fromstring(amazon_response.text)
lego_id = amazon_xml.find('.//{http://webservices.amazon.com/AWSECommerceService/2011-08-01}EAN').text
# Retrieve the part-out value of the set from BrickLink API
bricklink_params = {
'item_no': lego_id,
'new_or_used': 'N',
'guide_type': '6month',
I am open to different types of API integration, but have not yet determined my preference. The programming language for the API is also undetermined.
Ideal skills for this project would include:
- Proficiency in API development and integration
- Experience with multiple API integration types
- Knowledge of Python, JavaScript, and PHP programming languages
If you have experience in API development and are able to provide recommendations for API integration and programming language, please apply for this project.
I have some information from chat gtp but I am not that experienced with software development. And this is the question I asked.
Can you design code for the following using api
1. Check prices of Lego sets on Amazon AU in a given price range.
2. With the Lego sets found in the given price range use their Lego id number to find the part out price on bricklink using the 6 month average sale pricing
3. Show the difference between the Amazon price and the bricklink part out price as a percentage for all Lego sets searched in descending order
import os
import requests
import xml.etree.ElementTree as ET
# Amazon API credentials
AMAZON_ACCESS_KEY = 'your_access_key'
AMAZON_SECRET_KEY = 'your_secret_key'
AMAZON_ASSOCIATE_TAG = 'your_associate_tag'
# BrickLink API credentials
BRICKLINK_API_KEY = 'your_api_key'
BRICKLINK_API_TOKEN = 'your_api_token'
# Price range to search on Amazon
min_price = 10
max_price = 50
# Search for LEGO sets on Amazon AU within the price range
amazon_api_url = 'https://webservices.amazon.com.au/onca/xml'
amazon_params = {
'Service': 'AWSECommerceService',
'Operation': 'ItemSearch',
'AssociateTag': AMAZON_ASSOCIATE_TAG,
'SearchIndex': 'Toys',
'Keywords': 'lego',
'MinimumPrice': min_price,
'MaximumPrice': max_price,
'Availability': 'Available',
'ResponseGroup': 'Images,ItemAttributes',
'MerchantId': 'All'
}
amazon_response = requests.get(amazon_api_url, params=amazon_params)
amazon_xml = ET.fromstring(amazon_response.text)
# Parse the Amazon XML response and retrieve ASINs of the LEGO sets found
asins = []
for item in amazon_xml.iter('{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Item'):
asin = item.find('{http://webservices.amazon.com/AWSECommerceService/2011-08-01}ASIN').text
asins.append(asin)
# Retrieve the part-out value of each LEGO set on BrickLink
bricklink_api_url = 'https://api.bricklink.com/api/store/v1/items/part-out-value'
headers = {
'Authorization': f'Bearer {BRICKLINK_API_TOKEN}',
'Content-Type': 'application/json',
'User-Agent': 'MyApp/1.0'
}
part_out_values = []
for asin in asins:
# Retrieve the LEGO ID of the set from Amazon Product Advertising API
amazon_api_url = 'https://webservices.amazon.com.au/onca/xml'
amazon_params = {
'Service': 'AWSECommerceService',
'Operation': 'ItemLookup',
'AssociateTag': AMAZON_ASSOCIATE_TAG,
'ItemId': asin,
'ResponseGroup': 'ItemAttributes'
}
amazon_response = requests.get(amazon_api_url, params=amazon_params)
amazon_xml = ET.fromstring(amazon_response.text)
lego_id = amazon_xml.find('.//{http://webservices.amazon.com/AWSECommerceService/2011-08-01}EAN').text
# Retrieve the part-out value of the set from BrickLink API
bricklink_params = {
'item_no': lego_id,
'new_or_used': 'N',
'guide_type': '6month',