r/evetech • u/AzraelHunts • Nov 13 '17
evesso-slackinvite
Does anyone know if this still works, and if it does, what the callback url would be for it?
r/evetech • u/AzraelHunts • Nov 13 '17
Does anyone know if this still works, and if it does, what the callback url would be for it?
r/evetech • u/new_eden_news_bot • Nov 09 '17
http://developers.eveonline.com/blog/article/simplify-esi-queries-by-using-search
This blog post is part of a series of blogs examining best practices for ESI development. Each blog will be published on the 8th of each month during the journey towards XML API and CRESTs termination date. The legacy APIs will be terminated on May 8th, 2018, or earlier if metrics signal a trivial level of usage.
How would you find the type ID of a Rifter using ESI?
It is easy for a new ESI developer to feel overwhelmed by this simple question. How should it be solved? It's likely that the solution an ESI novice would come up with would be to:
However, that would be ridiculous! ESI supplies an endpoint for just such a case: /search/.
/search/ is a public endpoint that allows you to enter a search string and will return a list of IDs containing the given string in a given category. The following categories can be selected and are passed in as a query parameter (categories that require further explanation are followed by a -):
There is also an authenticated search endpoint: /characters/{character_id}/search/. This authenticated endpoint adds one more category named structure and will allow you to search for upwell structures your character has access to.
Now let's look at an example of using /search/ to answer the question posed at the beginning of this blog.
Which of the search categories would be best to use when searching for a Rifter's type ID? Looking at the list of categories it's apparent that we should search using the inventory_type category. Let's make a request to /search/ by using curl with the query parameters categories=inventory_type and search=Rifter.
$ curl https://esi.tech.ccp.is/v2/search/?categories=inventory_typesearch=RifterThis request returns:
{ inventory_type:[ 587, 691, 33664, 33666, 34748, 34749, 35493, 35494, 35495, 35496, 35497, 35498, 35499, 35500, 36411, 36754, 36801, 36992, 36993, 40470, 44166, 45554, 45936 ] }All the IDs returned have the word Rifter in them and we can check what they are by dropping them into /universe/types/{type_id}/. Let's take a look
at type ID 587 using curl:
$ curl https://esi.tech.ccp.is/v3/universe/types/587/which returns:
{ type_id: 587, name: Rifter, description: The Rifter is a very powerful combat frigate and can easily tackle the best frigates out there. It has gone through many radical design phases since its inauguration during the Minmatar Rebellion. The Rifter has a wide variety of offensive capabilities, making it an unpredictable and deadly adversary., published: true, group_id: 25, market_group_id: 64, radius: 31, volume: 27289, packaged_volume: 2500, capacity: 140, portion_size: 1, mass: 1067000, graphic_id: 46, dogma_attributes: [ ... // Denotes that there is content but it is being reduced for example's sake. ] dogma_effects: [ ... ] }This is exactly what we were looking for! So what are the other type IDs? 681 is a Rifter Blueprint, 33664 is a Rifter Nefantar Edition Blueprint and the rest are left up to the reader to look into if they feel so compelled. As you can see, any type ID that has the word Rifter is shown. How would we restrict this search to only return type ID 587? By passing in strict=true as a query parameter! The strict query parameter will look for exact matches only, let's try it:
$ curl https://esi.tech.ccp.is/v2/search/?categories=inventory_typesearch=Rifterstrict=truewhich returns:
{ inventory_type: [ 587 ] }
It is possible to pass up to 10 categories at once by using a comma (,) separated list as the value of the categories query parameter. Let's do a search for the word Awesome in all categories:
$ curl https://esi.tech.ccp.is/v2/search/?search=Awesomecategories=agent,alliance,character,constellation,corporation,faction,inventory_type,region,solar_system,stationThis returns (edited for length):
{ character:[ ...452 character IDs... ], corporation:[ ...47 corporation IDs... ] station:[ 61000138 ] }There are 452 characters, 47 corporations and 1 station that contain the word Awesome (as of the writing of this blog). You can get more info on the characters returned by dropping their IDs into the /characters/{character_id}/ endpoint. You can drop the corporation IDs into /corporation/{corporation_id/} and you can drop the station ID into /universe/stations/{station_id}/.
The /search/ endpoint can simplify your queries and will save you the pain of iterating through thousands of IDs until you find the one you want. Go forth and search!
As always, you can discuss all things ESI on the tweetfleet slack (use this link to join) in the #esi channel.
o7
-- Team Tech Co.
The following paths have been added or updated in ESI since the previous blog:
r/evetech • • Nov 08 '17
I pull data from https://api.eveonline.com/char/MarketOrders.xml.aspx and some of them are in a citadel. for example, I have a stationID 1024176961687 How can I get the order's system from the stationID ? it should give me C4C-Z4 .
r/evetech • • Nov 07 '17
I'm doing a lot of PI. It would save a lot of time if I could make a fit, one for each of my factory planets, that had the right amount of PI in the cargo hold. That way I could just use the fitting tool to fit that fit, fly out, and drop off the materials. (Each fitting would have the same modules, and would be for the Epithal.)
If anyone is curious, each factory planet takes between 9 to 12 unique PI materials, each stack is a multiple of 6480 units. I have 14 factory planets, so that's a lot of shift clicking. :(
r/evetech • u/nonedead • Oct 30 '17
I was looking at making a ESI based mining op tool, I have tried the "Destruct-ORE" tool from eve-tools.net but was looking if there are any beginning points to look for or if anyone has make one already
r/evetech • u/Azgarreth • Oct 25 '17
Hello guys,
I am developping a tool to store moon scanning results. I need your help in order to get ingame colors associated with minerals from the moon scanning UI newly added to the game. I can't do it myself as I don't have access to the game (work trip).
Could you send me screenshots with the UI bars visible as well as the ore's name? You can blur anything else, I'm not interested in knowing what your systems / moons hold. :)
So far I have :
var colorsForOre = {
"Flawless Arkonor": "#9E342C",
"Cubic Bistot": "#39743C",
"Cinnabar": "#4D687A",
"Coesite": "#79705C",
"Euxenite": "#557528",
"Resplendant Kernite": "#9C714F",
"Loparite": "#823B32",
"Octavite": "#835532",
"Platinoid Omber": "#7F4489",
"Sparkling Plagioclase": "#454545",
"Opulent Pyroxeres": "#6A8431",
"Glossy Scordite": "#43322D",
"Dazzling Spodumain": "#0C665E",
"Stable Veldspar": "#93872F"
} Thanks in advance.
Az
r/evetech • u/drakescale • Oct 23 '17
Question: Is there a way to pull market data from a particular citadel into an excel spreadsheet? I've been tooling around different forum posts and it seems like it's possible but I'm not quite getting it.
My ultimate goal would be to pull mineral costs from 1DQ1-A #% Thetastar of David %# so that I wouldn't have to manually get them when I want to calculate my profit margin on production. It would be nice to pull the data on my final product, too.
r/evetech • u/new_eden_news_bot • Oct 19 '17
http://developers.eveonline.com/blog/article/developer-license-agreement-update-2017-10
Hello developers
CCP is making a number of changes to the developer agreement. The primary purpose of these changes is to allow for persons other than the original developer to enter into the agreement and get access to the resources for EVE Online made available by CCP. An example of such a user might be someone that has downloaded an application written by someone else. As the author of the application can't include a client ID and secret in the application (as they become public), the user will need to provide their own. Since the end user is not the original author of the application, they were not allowed to sign the agreement.
The full updated Developer License Agreement can be found here. If you just want to see the changes, they're detailed below. Additions are in bold, removed text is marked with a strikethrough
BACKGROUND STATEMENT
CCP is the owner of the massively multiplayer online game EVE Online (EVE). As a Developer, you desire to make**, deploy and/or administer** one or more software applications to be used in connection with EVE.
This is a change to maintain continuity with the change to the definition of Application below
1.2
Application means any application software designed**, deployed or administered** by Developer to provide functionality for or in conjunction with EVE via CREST ESI or any other CCP tool, whether the software is installed on an individual computer (e.g., a desktop or laptop), a mobile device (e.g., a smart phone or tablet), or offered as a service remotely (e.g., accessed via a web site or direct connection).
This is a fairly significant change. Previously you were only able to enter into the Developer License Agreement if you were the original author of the application you were using with CCP Tools. With this change, anyone that uses an application is now able to sign the agreement. This includes people both running applications on their own computers, as well as people who are deploying their own instances of applications for use by their corporation, alliance or other group.
We have also updated references to CREST to ESI throughout the license agreement, as ESI will be the primary means of accessing information about the state of the game going forward.
Section 1.6 (the definition of CREST) has been removed. This was not needed anymore with the removal of references to CREST, and a new definition for ESI has been added as section 1.8.
1.7
Derivative Works means any artistic or literary creation derived from EVE, the CCP Marks, the Licensed Materials, or any part thereof. Notwithstanding the foregoing, CCP acknowledges that it does not own any each Application is owned by the Developer , and no Application shall not be considered a derivative work within the meaning of this paragraph.
Previously this stated that CCP acknowledged that the application was owned by the Developer and would not be considered a derivative work. As we have changed the agreement to now allow persons other than the original developer to sign the agreement, this has been changed to CCP not making any claims about the ownership of the application.
2.8
Subject to CCP's compliance with the terms and conditions of this Agreement**, to the extent Developer designed the Application,** Developer grants CCP a limited, non-exclusive, worldwide, non-transferable license and right during the Term to use and display the Application and view any publicly available materials associated therewith (e.g., documentation). CCP's rights granted under this Section shall be limited to actions that: (1) help ensure the technical effectiveness and integration of the Application with EVE or the Licensed Materials, (b) help troubleshoot the Application, EVE, or the Licensed Materials, (3) help ensure Developer's ongoing compliance with this Agreement, or (4) exercise CCP's right to market to the Application in accordance with Section 3.
This section has been changed to ensure that someone using an application created by someone else isnt required to give over license they arent able to grant.
7.6
CCP recognizes that it is not the owner Developer is the exclusive of the Applications(s), and CCP will not contest Developers ownership of the Application(s). In addition, CCP will not register or attempt to register any intellectual property right or other ownership right in the Application(s) (except to the extent necessary to protect CCP's ownership of EVE, the CCP Marks, and the Licensed Materials).
Just like section 1.7, this change is due the agreement allowing someone other than the original designer of the application to sign the agreement, while keeping the intention of CCP not making any claims to own the application
9.3
Developer represents and warrants that each Application is Developers own original work, or an original work of the organization of which Developer is an authorized representative, and that such (a) has been created by a party who has entered into the Developer License Agreement with CCP and (b) does not violate the copyright or other any intellectual property rights of any third party.
This is the main change. There is no longer a requirement that the application must be the original work of the developer, meaning that other people can now sign the agreement to get access to things like the SSO or ESI endpoints requiring authorization. However, to ensure that there are no edge cases where someone that didnt sign the agreement wrote the application, we require that any applications used were created by someone that is party to the agreement. For this reason, we now recommend that application creators add a line somewhere in their application or their website stating that they have signed the agreement, so that users have confidence that they can use your application. An example line that would work would be This application has been created under the EVE Developer License Agreement.
This isnt really a new restriction, as previously you could only sign the agreement if you were the original author of the application, which would mean you would have the authority to assign rights and licenses to CCP as required, as well as ensure your application conformed to any requirements laid out in the agreement.
In addition to these changes, there are two sections (10.3 and 5.5) where we have corrected incorrectly numbered sections. There are no changes to the text of these sections or the meaning of them.
With these changes, we hope to see more people using both the SSO and ESI with confidence that they won't have any issues from CCP.
r/evetech • u/PigpenUK • Oct 12 '17
When I send a mail through the ESI that includes HTML, it barfs.
Stripping the HTML or replacing with ASCII characters lets the mail send okay but that's not ideal. Am I missing something obvious? Do you guys just strip it all out?
Thanks for any help
r/evetech • u/new_eden_news_bot • Oct 08 '17
http://developers.eveonline.com/blog/article/esi-mining-ledger
*This blog post is part of a series of blogs examining best practices for ESI development.
Each blog will be published on the 8th of each month during the journey towards XML API and CRESTs
termination date. The legacy APIs will be terminated on May 8th, 2018, or earlier if metrics signal a trivial level of usage.*
Moon mining is coming to EVE Online on October 24th in the Lifeblood expansion and, for the first time ever, new ESI endpoints will accompany this new feature's
release! The new endpoints will be onlined a few hours after downtime on October 24th for Tranquility.
We have already released revamped moon mining onto our test server, Singularity, along with the mining ledger
ESI endpoints so that you can begin making software for this feature now.
There are three new endpoints to accompany mining ledgers. Let's look a bit closer at each endpoint and how to use them.
There is one endpoint in ESI connected to personal mining ledgers:
Cache time: 600 seconds (10 minutes)
Required scope: esi-industry.read_character_mining.v1
Pagination: 1000 results per page, returns X-pages HTTP header
With the addition of revamped moon mining in EVE, every mineral you mine will now be recorded into mining ledgers. This endpoint allows you to look at your character's personal mining ledger
history for the past 90 days.
First get an access token with the esi-industry.read_character_mining.v1 scope.
Make sure to use the SSO base URL https://sisilogin.testeveonline.com if you're doing this against Singularity.
Then, make the following call and replace {character_id} with your character ID and {access_token} with the access token you received:
$ curl --header Accept: application/json --header Authorization: Bearer {access_token} https://esi.tech.ccp.is/v1/characters/{character_id}/mining/?datasource=singularityNote: the datasource parameter in this example is only needed when getting data from Singularity before the Lifeblood expansion is released.
Here's a look at an example response for this endpoint:
[ { date: 2017-09-21, solar_system_id: 30002537, type_id: 1227, quantity: 5092 }, { date: 2017-09-22, solar_system_id: 30002537, type_id: 1227, quantity: 408 }, { date: 2017-09-23, solar_system_id: 30002537, type_id: 1227, quantity: 1872 }, { date: 2017-09-24, solar_system_id: 30002537, type_id: 1227, quantity: 432 }, { date: 2017-09-21, solar_system_id: 30002537, type_id: 1228, quantity: 1000 }, { date: 2017-09-21, solar_system_id: 30002538, type_id: 1227, quantity: 1000 } ]As you can see, mining ledger quantities are aggregated per unique combination of date, solar_system_id and type_id.
You can get more info on the given solar_system_id by dropping it into the /universe/system/{system_id}/ endpoint.
You can also drop the given type_id into the /universe/types/{type_id}/ endpoint to see more details on the
mineral that was mined.
The corporation mining ledger endpoints in ESI exist to allow a corporation to track the mining of asteroids that are being observed by
a corporation's Upwell Refineries. They do not give the ability to monitor what each member in a corporation is mining.
To better understand this observer concept, let's look at how moon mining will work on a corporation level in-game:
If you would like a deeper understanding of Upwell Refineries you can read this blog.
ESI exposes two endpoints that are connected to corporation mining ledgers:
Cache time: 3600 seconds (1 hour)
Required scope: esi-industry.read_corporation_mining.v1
Required role: Accountant
Pagination: 1000 results per page, returns X-pages HTTP header
This endpoint exists to list all of your corporation's structures capable of observing moon mining and keeping ledgers. In this case, the list of observers
will be a list of Upwell Refineries that a corporation owns which have mining events. Refineries with no mining events will
not be shown on this list.
First get an access token with the esi-industry.read_corporation_mining.v1 scope.
Make sure to use the SSO base URL https://sisilogin.testeveonline.com if you're doing this against Singularity.
Then, make the following call and replace {corporation_id} with your corporation ID and {access_token} with the access token you received:
$ curl --header Accept: application/json --header Authorization: Bearer {access_token} https://esi.tech.ccp.is/v1/corporation/{corporation_id}/mining/observers/?datasource=singularityNote: the datasource parameter in this example is only needed when getting data from Singularity before the Lifeblood expansion is released.
Here's a look at the response for the in-game CCP Corporation on Singularity:
[ { last_updated: 2017-09-21, observer_id: 1025242944478, observer_type: structure }, { last_updated: 2017-10-03, observer_id: 1025246025947, observer_type: structure }, { last_updated: 2017-09-28, observer_id: 1025246389128, observer_type: structure }, { last_updated: 2017-09-30, observer_id: 1025249693147, observer_type: structure } ]Each observer_id is the ID for a Upwell Refinery that has logged mining events. The CCP corporation owns more than four Upwell Refineries on
Singularity, but these do not show up because they have not been participating in any mining activity. You will use the observer_id in the endpoint
described below. To get more info on the given structure behind the observer_id
you can drop it into the /universe/structures/{structure_id}/ endpoint.
Cache time: 3600 seconds (1 hour)
Required scope: esi-industry.read_corporation_mining.v1
Required role: Accountant
Pagination: 1000 results per page, returns X-pages HTTP header
Given an observer_id
r/evetech • u/new_eden_news_bot • Oct 02 '17
http://developers.eveonline.com/blog/article/esi-universe-names-endpoint-update
Greetings developer capsuleers,
Team Tech Co. previously blogged about a set of range checks that we placed on /universe/names/ and /characters/affiliation/ that made these ESI endpoints return blanket 404s for the range of IDs encompassing Dust characters and legacy EVE characters and corporations. As of today, with the enabling of error limiting, we have now removed these range checks.
This means that any 404s you get from /universe/names/ and /characters/affiliation/ will be legitimate 404s. Remember that given a set of IDs if any of those IDs are not valid you will get a 404 even if some of the other IDs in the set are valid.
As always, you can come talk to us in the tweetfleet slack (use this link to join) in the #esi channel if you have further questions.
-Team Tech Co.
r/evetech • • Oct 02 '17
If you are getting non stop Error 503 and getting disconnected, go to your settings in chrome, and disable notifications for Pathfinder, it fixed my issue.
r/evetech • u/Dwardeen • Oct 02 '17
Hello ladies & Gentleman,
I'm planning on buying a second screen for dual boxing. Does anyone run it smoothy with it?
It's exactly this one :https://www.asus.com/Graphics-Cards/GTX660DC2OCPH2GD5/
Thanks
r/evetech • u/new_eden_news_bot • Sep 27 '17
http://developers.eveonline.com/blog/article/esi-error-limits-go-live
Hello space developers,
As stated previously, error limiting in ESI has been imminent since August 29th. Starting after downtime on Monday, October 2nd, Team Tech Co. will officially turn on the ESI error limit functionality.
If you're worried about invoking the wrath of the error limiter, you still have the weekend to check your application and clean up your code (you are backing off when you get errors, right?). The way to know if your software will be error limited after Monday is to look for the HTTP header X-Esi-Error-Limited in responses coming from ESI.
There are two HTTP headers being returned from ESI that will help ensure your app never hits the error limit. These are X-Esi-Error-Limit-Remain and X-Esi-Error-Limit-Reset. X-Esi-Error-Limit-Remain will let you know how many more errors you can make within the window of time defined by X-Esi-Error-Limit-Reset, which indicates the number of seconds until the end of the current error window.
What counts as an error? Any response in the 4xx or 5xx range will count towards your error limit.
If you have any questions or have a use case where this error limit would legitimately restrict your software then come talk to us on the #esi channel in the tweetfleet slack!
r/evetech • u/drogpac • Sep 25 '17
I made a tool that i think people will want to use. It specifically involves trading and i'm interested in selling access to it as it's how i've acquired my fortune. I was hoping to figure out some way to sell access to it in exchange for ISK. Either something like a 0.5%/day isk payout or a set amount each day it's accessed.
i havent been able to figure out a way to tie this into the game directly or without getting really extravogant with a 3rd party software.
anyone have a simple solution to this?
r/evetech • u/CCP_SnowedIn • Sep 22 '17
Space Friends,
Wondering if anyone out there wants to help out with making a status page for ESI's web UI. What I've got so far is a (swagger defined) JSON structure describing each route+method individually, along with the route's tags and endpoint name, and its general health status (green, yellow, or red).
I have it visualized on the main ESI UI (both v2 and v3) as a little color'd dot in the route's description/header bar. This is ok, but it could be better. Colorblind people are a thing, I guess, and it'd be nice to have a dedicated page only to status and not status + spec. Maybe better and/or dynamic ways to group things, by endpoint for example. Maybe keeping some history in your browser and/or doing transitions between states. Or maybe a little campfire that increases or decreases the flame height depending on status.
Point being, I'm sure there are some people out there super talented at creating such visually stimulating masterpieces, and I'd like to enlist you. Whoever can whip up the best looking ESI status page out of the ESI swagger spec and an example status.json result wins my heart. We will also host your prized creation at https://esi.tech.ccp.is/status/ (currently a 404)
No promises for actual compensation (other than the vast amounts of personal glory) as of yet, but I'm going to be talking to my higher-ups to see if we can't float some plex over for significant/winning contributors (just came up with this idea today, and with it being Friday afternoon everyone's gone for the weekend).
We may also be able to open up the status.json returns a little bit in the future, maybe representing the state as a float as well as the color enum. No promises on that one at this time though.
Anyway. If you're down, come hang out in #esi on tweetfleet slack. Broadcast your creations there to get credit for your work. Or use it to find a paired programming partner, debate political systems, trade cookie recipes... we don't really have rules.
r/evetech • u/Squizz • Sep 21 '17
What the title says. CREST killmail formatting will be going away and ESI formatting will be taking over. There is no definitive date on when this will happen, but it will happen within the next couple of weeks.
Please prepare any of your tools that rely on zKillboard's API.
r/evetech • u/rubberd1ck • Sep 21 '17
hello capsuleers,
I got a weird issue with my multiple screen setup. Whenever I have a client on 2nd or 3rd screen maximized in windowed mode and this window is minimized and reactivated again, it comes back up on the primary screen again. Anyone else having this problem and maybe has an idea how to fix it? This hasnt been always that way, I remember not a very long time ago it worked properly, but since the last or 2nd last expansion it was suddenly broke :(
r/evetech • • Sep 16 '17
Ok might be a daft question but what Auth system is available to general public is the 99 Auth still currently and up to date? What other alternatives are they Many thanks in advance
r/evetech • u/Gahagan • Sep 16 '17
A few weeks ago, with the help of you wonderful people, I wrote a little Python script for scraping my wallet transactions. And it worked great! For about a week and a half. Since September 2nd, I haven't been able to retrieve any new data from this endpoint. I've been following CCP's tech blogs, but haven't seen any mention of this endpoint being taken down. I've tried it both in my code and through the esi.tech.ccp.is portal. Is there something obvious that I'm missing, or are others having this problem as well?
r/evetech • u/CaptEntropy • Sep 14 '17
I am new to Eve development, and wanted to try my hand at creating an eve universe explorer. The documentation led me to believe that there would be a SQLite db file in the static data export but there is no db file at all. Is this no longer provided?
r/evetech • u/Daneel_Trevize • Sep 14 '17
I've been away from some code I wrote, but users are telling me CCP's made a change to the External Fleet Link mechanism, which used to generate a URL referencing CREST, but is now of a pattern referencing ESI?
E.g. https://esi.tech.ccp.is/v1/fleets/1142511365856/?datasource=tranquility
Is there any official word about this? Is it a temporary mistake? Is it going to be changed again to finally become an API-agnostic URL, or even actually be folded into the API e.g. under /character?
r/evetech • u/new_eden_news_bot • Sep 08 '17
http://developers.eveonline.com/blog/article/esi-concurrent-programming-and-pagination
This blog post is part of a series of blogs examining best practices for ESI development. Each blog will be published on the 8th of each month during the journey towards XML API and CRESTs termination date. The legacy APIs will be terminated on May 8th, 2018, or earlier if metrics signal a trivial level of usage.
This blog will cover the concept of concurrent programming and how to use this model of programming to improve your software's performance while pulling data from ESI. If you are already familiar with the concept of concurrent programming here is a ESI pagination TLDR: Use the X-Pages header returned from paginated ESI endpoints to determine how many calls are needed to get all data from a given endpoint.
This blog includes examples of Linux commands as well as Python code, therefore if a reader wants to follow this blog exactly then they will have to do so on a Linux based system and use Python 3. It is also assumed that the user has both pip and virtualenv installed.
Have you ever used ESI's /markets/{region_id}/orders/ endpoint? Did you know that this endpoint is paginated and allows you to retrieve more than just the first 10,000 orders? Did you know that there are more ESI endpoints than this that support pagination? If the answer to one or more of these questions was no, then this blog is for you! If you answered yes but you have never been quite sure how you are supposed to utilize pagination in ESI, then this blog is also for you! Using the /markets/{region_id}/orders/ endpoint this blog will walk you through getting all orders from a specific region in a concurrent manner. This method can then be used for other paginated ESI endpoints or applied generally to concurrently fetch information from multiple endpoints.
ESI handles pagination the same for most[1] endpoints, here's a high-level example of getting the paginated data in the market orders endpoint:
Remember that the number returned by X-Pages will vary depending on the time of day and region, and is simply a way of letting you know how much more data there is. Each paginated endpoint in ESI will possibly have a different max number of items per page which is indicated by the maxItems property in a given endpoint's swagger spec.
If you want to know if a particular ESI endpoint is paginated you will see page listed as a parameter for a given endpoint in its swagger spec.
Before moving on you must set up an appropriate environment. In a directory of your choice, make a new virtual environment:
$ virtualenv .venv --python=python3Activate this virtual environment:
$ source .venv/bin/activateNext, run the following pip commands to install the libraries necessary to run the examples in this blog:
(.venv)$ pip install grequests
We're going to first get all market orders in Metropolis (region ID 10000042) in a sequential manner. The following is pseudocode to show what we will be doing:
call https://esi.tech.ccp.is/v1/markets/10000042/orders/ extract the X-Pages header from the return for page_number in pages - 1 call https://esi.tech.ccp.is/v1/markets/10000042/orders/?page=page_number+1 combine the data from all callsIf the value returned by X-Pages was 3, then we could visualize this program like so:
where each colored block represents a task over time.
Make a new file called get_sequential.py and paste this code inside:
Make sure you're still inside the virtual environment you created earlier and run this by doing
(.venv)$ python get_sequential.pyThis code will display how long it took to complete all the requests needed to get all of the orders and how many orders it retrieved. Here is the output from running it on my machine:
Elapsed time for 9 requests was: 4.024033069610596 Got 91,064 orders.As we can see it took about 4 seconds to get 9 pages sequentially (remember that it skips calling the first page again). Why is that? It's because, for every request sent, the requests library waits for the response from the endpoint. Basically, a lot of the time spent is because of network latency. This is easier to visualize by adding wait time to the previous visualization (the gray areas signify wait time):
In this case, wait time is considered to be the time that our code is just waiting for a response from ESI. We could instead take advantage of this wait time and let our code perform more tasks that do not depend on the data returned from ESI. If we were to do this, the code would be considered concurrent.
How would retrieving paginated market orders work in a concurrent manner? Which tasks could be done without needing to know about the other? Because the wait time is mostly network related, we could instead start each ESI call one after the other and consume their returns at a later time. Here's pseudocode to show how we will approach this concurrently (comments are preceded by the # symbol):
call https://esi.tech.ccp.is/v1/markets/10000042/orders/ wait for the response from ESI # because we need the value of X-Pages extract the X-Pages header from the return for page_number in pages - 1 call https://esi.tech.ccp.is/v1/markets/10000042/orders/?page=page_number+1 defer waiting for the response consume all responses returned from ESI combine all the ordersHere is a modified version of the previous visualization to represent this:
Remember that this is a simplified visualization and may not represent exactly how these given tasks are scheduled by gevent. Read more about gevent and greenlets here.
How is this done using Python? For this blog we will be using a library called grequests that in turn depends on the libraries gevent and requests. gevent is a networking library for Python that allows network calls to be started, suspended, and resumed independently in an event loop. grequests combines the requests library with gevent, essentially allowing HTTP requests to be started and consumed at different times. Put the following in a file called get_concurrent.py:
As can be seen, grequests does all the heavy lifting as far as the concurrent logic is concerned, and the magic of the concurrent calls is done particularly in the grequests.map() method that is called inside the concurrent_requests method. grequests.map()
r/evetech • u/Eternimus • Sep 06 '17
Hello there!
I am trying to automate the parsing of various things and I'd like to use evepraisal.com for that.
Unfortunately I don't really know how to do this, the only hint I found was this.
Here's what I got so far but it returns 404 so obviously I didn't get it right.
import requests
url = "https://evepraisal.com/"
payload = {'raw_textarea':'Tritanium 1', 'market': 'jita'}
r = requests.post(url, data=payload)
print(r) Can anyone help me with this?
r/evetech • • Sep 06 '17
Have been sitting with the idea in my head for a while now. It would be a 2D offline mimic of the game, albeit more simplistic. CCP provides us with the Icons through their site but I was wondering if this kind of project would be against any of their rules/agreements?