troystump / lolapi Goto Github PK
View Code? Open in Web Editor NEWRESTful Objective-C client for the popular online game "League of Legends" by Riot Games.
License: Apache License 2.0
RESTful Objective-C client for the popular online game "League of Legends" by Riot Games.
License: Apache License 2.0
I called getLeaguesEntryDataForSummonersWithIDs
in the LoLAPI Manager and the request failed with an access denied. I dug further into the situation and it turns out that the message I was getting was "access denied" in the request. The request that the LoLAPIManager was sending out was using a version that was older than the newest one.
LoLAPI:
https://na.api.pvp.net/api/lol/na/v2.4/league/by-summoner/45756201/entry?api_key=xxxxx
Needed to be:
https://na.api.pvp.net/api/lol/na/v2.5/league/by-summoner/45756201/entry?api_key=xxxxx
I went ahead into the LoLAPIManager.m file and changed
forMajorVersion:2
andMinorVersion:4
to
forMajorVersion:2
andMinorVersion:5
Every worked as expected after that. I think it should pull the most recent version instead of statically declaring the version in the API.
Just a question of whether if I can save the json input and run the api with that json in an offline environment? Didn't go through all the code yet but I am assuming you get a huge chunk of json data and parse it in different classes? Would it be possible to save that input and parse the saved input when the user is offline? If not, should I be looking at CoreData/NSUserDefaults in saving the necessary data separately?
Thanks for your work in this project!
I retrieve a LoLStaticImage from each champion, however how do I display this image into a UIImageView? I noticed the "sprite, full, and group" variables but they print to the screen as null.
[LoLAPIManager initWithAPIKey:@"" region:LoLRegionIDNorthAmerica];
Currently when I initialize the api with the api key and the region, I can't re-initialize with a new region until the app is closed(the api attempts to get information from the region that was set before)
Is there a workaround for this issue?
Thanks,
Calvin.
Don't ask me why but rito decided to change the links to the static data api for all regions.
https://kr.api.pvp.net/api/lol/kr/--->https://global.api.pvp.net/api/lol/static-data/kr/
https://euw.api.pvp.net/api/lol/euw/--->https://global.api.pvp.net/api/lol/static-data/euw/
It seems it is only for static data APIs and for all regions.
How would I go about getting the Champion Stats from their id in that example you posted on README? It might be something good to have. Im not sure where to get stats from
Seems like this function gives an error regardless of any configuration chosen. Can you verify that there might be an issue with this function?
Error Log:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<LoLStaticItem 0x7fbb495383e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key description.'
Any support for foreign characters such as korean/chinese? Gets the below message when attempting to input korean characters to getSummonersWithNames function.
2014-12-17 19:46:49.347 League of Legends[3199:550423] W restkit:RKObjectManager.m:638 Asked to create an RKManagedObjectRequestOperation
object, but managedObjectStore is nil.
2014-12-17 19:46:49.357 League of Legends[3199:550806] E restkit.network:RKObjectRequestOperation.m:542 Object request failed: Underlying HTTP request operation failed with error: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x174673500 {NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x174242910 "unsupported URL"}
Hi, I am working with getStaticCHampionsWithKeysAsIDs from the LoLAPIManager with LoLStaticChampDataSpells passing in as additionalData parameter. Seems like it's a simple mapping issue. Hopefully it's not because I didn't update like last time D: , but here is the console output.
2014-10-01 22:57:10.593 League of Legends[3106:35112] E restkit.object_mapping:RKMappingOperation.m:449 Failed transformation of value at keyPath 'vars' to representation of type 'LoLStaticSpellVariables': Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3002 "Failed transformation of value '(
"<LoLStaticSpellVariables: 0x7fc08d987c20>",
"<LoLStaticSpellVariables: 0x7fc08d987910>"
)' to LoLStaticSpellVariables: none of the 2 value transformers consulted were successful." UserInfo=0x7fc08d987a90 {NSLocalizedDescription=Failed transformation of value '(
"<LoLStaticSpellVariables: 0x7fc08d987c20>",
"<LoLStaticSpellVariables: 0x7fc08d987910>"
)' to LoLStaticSpellVariables: none of the 2 value transformers consulted were successful., detailedErrors=(
"Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3002 "The given value is not already an instance of 'LoLStaticSpellVariables'" UserInfo=0x7fc08d988030 {NSLocalizedDescription=The given value is not already an instance of 'LoLStaticSpellVariables'}",
"Error Domain=org.restkit.RKValueTransformers.ErrorDomain Code=3000 "Expected an inputValue
of type NSNull
, but got a __NSArrayM
." UserInfo=0x7fc08d987020 {NSLocalizedDescription=Expected an inputValue
of type NSNull
, but got a __NSArrayM
.}"
)}
That is the gist of it but if you would like the full error output , I posted in the pastebin. http://pastebin.com/G00A3ned
Thanks
@Property (nonatomic, strong) LoLStaticGold *gold;
This property might not be working correctly; returning a null value
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.