GithubHelp home page GithubHelp logo

tba-requests's Introduction

tba-requests

The source code and help document for TBA Requests.

Note: TBA Requests is not currently available. You can still download and use the GAS file yourself, but you can't get it from Google's marketplace. The way Add-Ons are distributed has been changed and a lot more effort is required on my part to get it published. I'll try to get it up, but it's a low priority for me, so no guarantees.

TBA-Requests is a Google Sheets plug-in that is available on the Chrome Web Store. It allows you to access data from The Blue Alliance's API v3 using Google Sheets' custom functions. For more information, see Help.txt or the official Google Doc.

tba-requests's People

Contributors

eiim avatar jaredhasenklein avatar nkalupahana avatar pchild avatar snaapsh0t12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tba-requests's Issues

Getting error on previously working custom function

I am attempting to use the following function on a large number of events to return a team number:

tbacustom(concatenate("event/",B2,"/awards"),"1","recipient_list","0","team_key")
where the B2 field has the event code (ex. 2012da)

It worked for about 500 entries, but then it stopped working and now only returns: There was an error retrieving the JSON.

Did I make too many requests or something?

I need help

I'm not sure how all this stuff works. I did the =TBASetKey(w/ my key), but everything returns "There was an error retrieving the data". I couldn't find anything in the help document that I could have done or didn't do. Am I doing something wrong? What would you suggest doing next?

Add TBAMatchAllianceTeams(match, color)

Write a function to retrieve the teams at a match for their color. Should be simple, I'll get it done this weekend if possible. Suggested by RomeroFRC5012 on Chief Delphi.

Weird Issue Maybe 2019 Problem?

Heyo, I'm from team 2551 and was loving using this app,
However as our scouting sheet has expanded there's been an issue we can't seem to rectify on our end. Over time random cells with data are replaced with #ERROR and when hovered over says "Service invoked too many times in a short time: exec qps. Try Utilities.sleep(1000) between calls. (line 0)."

If you'd be able to pop in and see whats up it'd be a HUGE help. Feel free to contact me with any questions [email protected]

Thanks!

Custom query comes back empty

The following query is giving me an empty list. If I remove the nav parameter I can see the json that comes back.

=TBACustom("district/2018chs/teams/simple", "team_number")

OPR, DPR and CCWM are mixed up

Great plug in thanks so much!
I think these functions are mixed up. I thought about trying to fix it, but didn't want to break anything. thanks again!
Bob

More helpful error messages

Summary

I would appreciate more helpful error messages if possible.

Example & End result

For example, entering =TBATeamEventMatchKeys("1836","2018cabl") returns a #REF error with the explanation Reference does not exist. The reason why it does not yet exist is because frc1836 does not have any matches for 2018cabl yet. An error like Team 1836 does not have any matches at Beach Blitz 2018 would be a lot more informative.

Further enhancement

To go a step further, it would be nice if the sheet could check against the API to see if that error will ever be resolved. By this I mean: using the last example, 1836 is competing at 2018cabl but there are not yet any matches for the event. However, if I entered =TBATeamEventMatchKeys("1836","2018cc"), I would currently get the same #REF error (or I would get Team 1836 does not have any matches at Chezy Champs 2018 under my suggested model). However, 1836 is not competing at 2018cc so there will never be any matches listed.

Proposed solution

Custom error messages

Custom errors are supported in Google Script and can be implemented per these guidelines.

In practice

In actuality, it is tricky to know when to serve the error, simply because the TBA API will just return null when there is no information to be relayed. Going back to the same example, both .../team/frc1836/event/2018cabl/status and .../team/frc1836/event/2018cc/status will return null which is just not that helpful. So, some additional logic would need to be worked out.

Return only official events?

When I run =TBATeamYearEvents(team, year), it returns a list of all events that that team went to in the specified year, as the documentation says. However, this includes offseason events. How would I go about returning only the official events that the team went to that year?

Random functions not working

I'm trying to use the sheet and some functions like TBAEventMatchKeys(event) are just not showing up in suggested functions and then return the #NAME? error in Google Sheets. Am I doing something wrong?

TBACustom still broken (or am I using it wrong)?

I'm trying to get the awards a team has won in the past, so I'm accessing team/frc1351/awards and trying to get the award_type value.
when I use "=TBACustom(TO_TEXT(E4))" (E4 is path above), I get the full JSON file, but "=TBACustom(TO_TEXT(E4),"award_type")" produces a blank/empty cell.
Am I doing something wrong?

edit: =TBACustom(TO_TEXT(E4), "0", "award_type") works, but =TBACustom(TO_TEXT(E4), "0", "award_type","1","award_type") doesn't

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.