Get all cs:go skins market names and icons url's - api

I need for my database all the cs:go skins (for weapons, cases, stickers, etc) names and icon url's.
An example is:
name: P250 | Asiimov
icon url: http://media.steampowered.com/apps/730/icons/econ/default_generated/weapon_p250_cu_p250_asiimov_light_large.7ccf465f7dc55d2d960465d404c10cbc8c442cee.png
Steam doesn't seem to have any API route to do that.
I tried this but got a 404 Not found response.
https://api.steampowered.com/IEconItems_730/GetSchemaItems/v1/?key=API_KEY&language=en&start=344&count=5
Using this post, I have been able to get the files items_game.txt, csgo_english.txt and items_game_cdn.txt.
The items_game.txt contains a paint_kits attribute which is an array containing objects of this format:
"559"
{
"name" "cu_flip_lore"
"description_string" "#Paintkit_cu_lore"
"description_tag" "#Paintkit_cu_lore_Tag"
"style" "7"
"pattern" "flip_lore"
"pattern_scale" "1.000000"
"phongexponent" "255"
"phongintensity" "50"
"ignore_weapon_size_scale" "1"
"only_first_material" "0"
"pattern_offset_x_start" "0.000000"
"pattern_offset_x_end" "0.000000"
"pattern_offset_y_start" "0.000000"
"pattern_offset_y_end" "0.000000"
"pattern_rotate_start" "0.000000"
"pattern_rotate_end" "0.000000"
"wear_remap_min" "0.000000"
"wear_remap_max" "0.650000"
}
Using the name attribute I can get the icon url in the items_game_cdn file and the skin type in csgo_english.
My questions are: how to get the weapons type (AWP, P250, etc) for each item in the items_game file without parsing the description_tag attribute? The second one is how to retrieve the names and url's of the stickers, cases, etc which are not in the items_game_cdn file?

Related

ImportXML google sheet for shipment package tracking

I want to track each FEDEX, DHL and UPS shipment status directly from google sheets. I am using importxml function:
=IMPORTXML("https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers="&C2&"&locale=en_US&cntry_code=us","//h1/div[#class="redesignSnapshotTVC snapshotController_addr_label dest"]/title")
However it shows error.
Attaching my sheet link for this: https://docs.google.com/spreadsheets/d/1E1L0rn9-H4MCutI1On2uHDkkPo1pdjRpv014YREGIdU/edit?usp=sharing
Please tell what is best way to do it. I am from non tech background.
Thanks so much for help!
Common issue. You're trying to import html that is generated after loading. That means we have to look for how the data you want is generated.
Data source
Upon inspection of the site, I found that it was making an XHR to the URL https://www.fedex.com/trackingCal/track, and that it was doing so via POST with a long payload. The response was in JSON format. Of note, there is the scanEventList entry.
"scanEventList": [{
"date": "2020-07-15",
"time": "13:15:00",
"gmtOffset": "-07:00",
"status": "Delivery exception",
"statusCD": "DE",
"scanLocation": "SAN BERNARDINO, CA",
"scanDetails": "Future delivery requested",
"scanDetailsHtml": "",
"rtrnShprTrkNbr": "",
"statusExceptionCode": "17",
"isClearanceDelay": false,
"isDelivered": false,
"isDelException": true,
"isException": true
},
...
]
Solution
First, get the ImportJSON script from GitHub, and add it into your sheet's scripts (Tools > Script Editor). It's not the most amazing thing, but it will at least give us ImportJSONViaPost() to get the data we want:
=INDEX(ImportJSONViaPost("https://www.fedex.com/trackingCal/track","data=%7B%22TrackPackagesRequest%22%3A%7B%22appType%22%3A%22WTRK%22%2C%22appDeviceType%22%3A%22DESKTOP%22%2C%22supportHTML%22%3Atrue%2C%22supportCurrentLocation%22%3Atrue%2C%22uniqueKey%22%3A%22%22%2C%22processingParameters%22%3A%7B%7D%2C%22trackingInfoList%22%3A%5B%7B%22trackNumberInfo%22%3A%7B%22trackingNumber%22%3A%22"&A2&"%22%2C%22trackingQualifier%22%3A%22%22%2C%22trackingCarrier%22%3A%22%22%7D%7D%5D%7D%7D&action=trackpackages&locale=en_US&version=1&format=json",,"/TrackPackagesResponse/packageList/scanEventList,/TrackPackagesResponse/packageList/trackingCarrierDesc","noHeaders"),1)
Arguments:
URL for the tracker
The POST payload. Cell A2 Holds your tracking number.
Leave empty
Query - Lets us select the data that we want. In this example, I chose to select the carrier description and the entire scanEventList entry, but you can specify particular elements of that as well.
"noHeaders" means just the data.
Just using the JSON import gives us an entry for each element of scanEventList, but the first is the most recent, so, we use INDEX to retrieve the first entry, which should contain what you need.
For additional help on the ImportJSON package, see here.

Is it possible to associate a hyperlink to string in mule 4 response?

I am trying to build a flow, where I want to show an URL(hyperlink) in the response, which on click will open another flow end-point.
Example:
GET /list
output:
{
"object" :{
"accounts" : **url**,
"customer" : **url**
}
}
I want to add the hyperlink in the url (show in bold in output), which on clicking will open another flow passing either "accounts" or "customer" to the other flow as end-point.
Thanks in advance
The example indicates that the response is a JSON and I guess you are receiving it from a browser. You can add the hyperlink as the value of the attributes. However JSON doesn't have an URL data type, so the URLs will need to be strings, surrounded by quotes. Note that it is up to the browser to decide if those URLs are 'clickable' or just plain text.

"Name" for bitstream in Dspace when added through API is null?

I am trying to add a bitstream to an Item through Postman.When I post , I chose body as "form-data" and added a key as "file" and selected a file.In addition to it I have given key as "name" and value as the file name. It is getting successfully added to the Item but the name is null.
I assume you use DSpace 6.
First: Make sure you are logged in. Get the JSESSIONID cookie by calling
Post: http://yourserver.com/rest/login
with Query Params email and password
Then: Post the Bitstream like this
Post: http://yourserver.com/rest/items/your-item-id/bitstreams
Add the file under Body and select binary:
Set filename and description as Query Params:
Hit send.

OpenCart: Renaming the tabs on the welcome module

I'm using the "Welcome" module to insert custom html within different sections of my website. Is it possible to rename the tabs so I can find my modules easier?
Right now, when I view my welcome module, the content is organized as "Module 1", "Module 2", "Module 3", etc. I'd like to give these tabs custom name so I can find my content faster. Something like "Homepage Facebook Announcement", "Product Shipping Information", etc.
Version used: v1.5.5.1
it won't be easy, currently these names are not stored in database, this module 1 , module 2 names come from welcome.tpl file, there is a variable $module_row which increments foreach module like $module_row++ and the name is just shown like echo $tab_module . ' ' . $module_row;
if you really want it, you can add a new column in setting table and store your module name there, but then you will have to edit your getSetting() function too....
its kind of complex and not advisable if you don't what you are doing ...

How to localize the display name of an app for the Windows Store?

I registered a German and an English name for my Windows 8 app in the Windows Store Dashboard.
Afterwards I created two files in my solution:
Strings/de/Resources.resw with name "AppName" and value "German Title"
Strings/en/Resources.resw with name "AppName" and value "English Title"
Then I clicked on Edit App Manifest. In the display name field I entered "ms-resource:/AppName" but when I want to build my app I get an error which says that "NamedResource" cannot be found.
What am I doing wrong?
The documentation only writes: "Display Name: Specifies the friendly name for the app that is displayed to users. This string is localizable". But I have only one field (called Display name) in my app manifest to indicate my app name.
Ok. I've found it! For the "Display name" in "Package.appxmanifest" I have to enter "ms-resource:AppName". One should also enter "ms-resource:AppName" for the "Package display name" field (in tab Packaging).
I'd like to add an addendum to Benny Neugebauer's answer. If your .resw file happens to be stored in another assembly (as mine was), you might have to give it the fully qualified path to your resource name.
For example, if your AppName string was in a project named OtherProject, and a file named AppResources, and had a key of AppName, you would use the following syntax:
ms-resource:OtherProject/AppResources/AppName