[7.6.0 - version 12] GESI - Google Sheets ESI Add-On - Update install instructions

3.1.1 November 29, 2017


Bug Fixes

  • Fix issue with SSOing

Hi,

Getting this error, tried resetting Auth too:

Error retrieving token: invalid_request, Client credentials should only be provided once. Remove them from either the ‘Authorization’ header or the body. (line 424, file “Service”, project “OAuth2”)

That is the error version 3.1.1 fixed.

3.1.2 December 4, 2017


Bug Fixes

  • Fix Reference does not exist bug on character and corporation assets functions when the requested page is empty and opt_headers is false.
  • Fix no output in corporationExtractions function.

Hey,

can you add the function to get the personal Mining Ledger from the logged Chars? :slight_smile:

@Lord_Kaho

It already exists.

/**

  • Paginated record of all mining done by a character for the past 30 days
  • @param {string} name Name of the character used for auth. If none is given, defaults to AUTHING_CHARACTER.
  • @param {number} page page number of response to fetch. Defauts to page 1
  • @param {boolean} opt_headers Default: True, Boolean if column headings should be listed or not.
  • @return Mining ledger of a character
  • @customfunction
    */
    function characterMining(name, page, opt_headers)
1 Like

Hey man good stuff. I had some questions though. What is the rammifactions of exposing the 3rd Party App ClientID and Secret? My understanding is that the consequences are minimal given that the callback process is tied to the specific sheet ID? My cryptography knowledge is not top tier, so I am not sure if they can unhash the password? Would the secret hash be the password hash for the account registered to the app?

Aside from that, I have run into some odd issues with your script that required customization:

-Altering ESI path to /latest/ for certain endpoints that are not available int he v1 path. (Char bookmarks come to mind here)

-Altering the functions to allow custom refresh tokens (without custom refresh param’s your data’s freshness is up to google’s crazy auto refresh logic).

-Adding a google cache service to the url fetch’s to prevent excess url hits on google’s auto refresh. (this is annoying to implement since script functions run in parallel threads).

Good work though, this is the best ESI script I have found out there.

@C-137
TBH I’m not too familiar with OAuth2 standards in that regard.

It seems that characterBookmarks is actually a v2 route now, so that would be why v1 doesnt work. I’ll have an update out this weekend to update some of those routes that have been updated.

Caching is something i want to do eventually, but I don’t have a date of when i will start/finish it. If someone wants to make a PR i’ll be happy to review it.

Yea a few others are on v2 as well, it is mostly a simple fix, but some of the have different header structures.

I have not really solved my cahce issues yet either or I would send you a test sample. For example I call the same function 4x in one row, and google will run them in parallel causing all 4 to miss the cache together, causing 4x url fetches instead of 1 and 3 cache returns.

3.2.0 December 12, 2017


New Features

  • Add corporation bookmark functions.
  • Add corporation contract functions.

Changes

  • Update various endpoint route versions

New Required Scopes - Reauth will be required to use related functions

esi-bookmarks.read_corporation_bookmarks.v1 
esi-contracts.read_corporation_contracts.v1

I want to generate an auth link for someone whose name/corp_id are placed in the script, but who does not have write access to my spreadsheet. He is unable to see the GESI menu on the toolbar so I sent him the generated auth link. When he tries to authorize, he gets the following error upon clicking “Authorize”: “The state token is invalid or has expired. Please try again.” On my end, the error in the sheet reads “Access not granted or expired.” I’m assuming this has to do with the redirect after the auth and/or the fact that he does not have access rights, but it seems to be preventing my sheet from pulling his info. All I’m trying to do at the moment is use characterMining() to pull his mining history. The AUTHING_CHARACTER var is set to this user, and I’ve used the function with the character’s name as well. And of course for my own characters your script is working beautifully.

Is there a way I could bypass this without granting him write access to the sheet?

Sounds like the someone has provided a bad/expired API key.

@Chill_Slice

You have to be able to at least access the sheet for the callback to work. Easiest solution would be to try to give at least view access, have him do the sso, then revoke it. Else, do the same with edit access.

@Soldarius

This doesn’t use API keys.

I just started using CharacterWallletTransactions.

How many days/weeks/months of data will it pull and maintain?

@KenFlorian

ESI will return the transactions that occurred within the last 30 days in batches of 500. if more than 500 transactions occurred within the last month, you will have to supply the function with a from_id param, i.e. the oldest transaction_id returned. This will then return the records that happened before that id.

1 Like

Thank you.

What drives refresh rate, throttling?

I am now using the sheet heavily.

I’m seeing periods where “loading” takes a long time…a very long time and sometimes it never completes in a given game session.

Does CCP throttle this by IP, User?

Could I be creating latency problems for myself by using both these API calls and still being connected to EveKit through jeveassets?

Whatever Google Sheets does by default. I need to introduce some caching at some point, but no eta on when it will be done.

1 Like

edit: NVM. Work-around working as intended…simply call the function twice on the same sheet.

Are you willing / able to make this function return at least two pages, in a single result set back to the sheet?

characterAssets(name, page, opt_headers)

I’d rather keep the tool to be just a way to interact with ESI. End users can modify it to fit their specific needs.

1 Like