![]() ![]() However, I must note that a lot of these changes are aesthetic the EVE API allows the parameters to be added as GET parameters, resulting in a URL like. One URL that is not listed here but which would be a logical continuation of these would be, which could for example provide a summary, and link to the pages with detailed information. One interesting way to find a corp based on a characterID is that a GET to could return a 302 Found redirect to the corpâs address. Also, when the current user is not a member of a corp, you may still want to return certain information. This is because an URL identifies a resource, and given that a character can change corporations, using a characterâs ID is not a good basis to identify a corporation. I also changed the corporation info that took a characterID as the basis for looking up information into a corpID instead. Itâs very intuitive and very âhackableâ, as-in you can easily change the URL by cutting off parts, and get the results that you expect :). For some I made multiple entries if you would leave the out, you would get the first account (the only account for characters), and if you leave the out, you just get the first 1000 entries. (userID, apiKey, characterID, accountKey, beforeRefID)Ī âREST redesignâ of these URLs would look something like this: Īs you can see here, the parameters have been moved into the URI as integral part, and itâs become kind of a selector: âof all the characters, get the one with this ID, and then show me his charactersheetâ. The current URLs of the EVE API look like this (with POST parameters in parenthesis): There are also many examples on the web, e.g. Pretty usually means separating things with slashes and using lower-case. ![]() If the URLs are pretty, it just looks good on the eyes ^_^.start using a different backend and want to change your. That way, you can avoid trouble having to change all applications that use the API just because you e.g. This is a well-known mantra, which basically says it is good to spend some time on URL design so that you never have to change them again. As the EVE API is read-only, only GET requests are necessary. URLs point to resources, uniquely identified by one URL (independant of authentication information), which you can GET information from, POST updates to, modify with PUT or remove with DELETE.This is actually not really really important, but itâs one of the things that is usually the first things that people notice. Most RESTful APIs also like to use âprettyâ URLs, although this is more of aesthetic value. Some examples of this are using the GET method for retrieval of data and POST, PUT and DELETE for modifications, and other built-in functions of HTTP are means for authentication, caching, and error reporting. To quickly summarise the basic idea of REST and a RESTful web application in a few words, a REST API uses all the functionality that the HTTP standard provides. That is, it looks more like a âPOST style approachâ. But even though it falls under a narrow interpretation of REST, if you look at the actual API, it isnât really a RESTful way to go about it. However, there are also some things that are not so nice, and that could be done better.ĬCP claims to go with a REST style approach, which is great because it is surely a better and more simple approach than SOAP or XML-RPC. It has a number of good improvements, such as a move from a session-based authentication system to a stateless authentication based system, and publishing more information than they did before. EVE Online, an MMORPG that I play, will get a new API soon, which they wrote about a few weeks ago on their developers blog. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |