Games page back to semi-functional; games are out of order however

This commit is contained in:
2021-11-14 13:23:57 -06:00
parent b2a2a961b3
commit 077f74cd2b
9 changed files with 145 additions and 66 deletions

View File

@@ -76,6 +76,17 @@ class W3DHub
# Client requests news for a specific application/game e.g.: data={"category":"ia"}
# Response is a JSON hash with a "highlighted" and "news" keys; the "news" on seems to be the desired one
def self.news(category)
response = W3DHUB_API_CONNECTION.post(
path: "apis/w3dhub/1/get-news",
headers: DEFAULT_HEADERS.merge({"Content-Type": "application/x-www-form-urlencoded"}),
body: "data=#{JSON.dump({category: category})}"
)
if response.status == 200
News.new(response.body)
else
false
end
end
# Downloading games