Skip to content

Commit

Permalink
Merge branch 'firmegan'
Browse files Browse the repository at this point in the history
  • Loading branch information
awwpotato committed Oct 16, 2024
2 parents c45e12f + 855f8f4 commit 7ae991c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion TBAData.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
configuration = tbaapiv3client.Configuration(
host="https://www.thebluealliance.com/api/v3",
api_key={
"X-TBA-Auth-Key": "***REMOVED***"
"X-TBA-Auth-Key": "PpRS8F8YPmF2flKXvPY9S9HhzFypvmDRHR8zzBPCotpZLpsftS8rvZCdWhYB7zXN"
},
)

Expand Down
2 changes: 1 addition & 1 deletion nexusData.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
event_key = "demo8771" # TESTING! change to the event key before using at events
url = "https://frc.nexus/api/v1/event/" + event_key

headers = {"Nexus-Api-Key": "***REMOVED***"}
headers = {"Nexus-Api-Key": "gckINf2G_dswez0anwAsTTGQ9Cc"}


def nexusData():
Expand Down
11 changes: 8 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ use std::env;
use tba_openapi_rust::apis::configuration::{ApiKey, Configuration};
use tower_http::services::ServeFile;

use hensight::{
get_event_predictions, get_event_rankings, get_pulse_data, get_slide, get_statbotics_data,
SlideData,
mod model;
mod query;

use crate::{
model::SlideData,
query::{
get_event_predictions, get_event_rankings, get_pulse_data, get_slide, get_statbotics_data,
},
};

#[tokio::main]
Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs → src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
// SPDX-FileCopyrightText: 2024 Finnegan Dion-Kuhn

use chrono::{Datelike, Local, TimeZone};
use model::PulseData;
use rand::{seq::SliceRandom, thread_rng};
use tba_openapi_rust::{
apis::{configuration::Configuration, event_api},
models::event_ranking_rankings_inner::EventRankingRankingsInner,
};

mod model;

pub use model::{NexusEventStatus, NexusMatch, SlideData, StatboticsReturn, StatboticsTeamYear};
pub use crate::model::{
NexusEventStatus, NexusMatch, PulseData, SlideData, StatboticsReturn, StatboticsTeamYear,
};

pub fn get_slide<'a>(
slides: &'a Vec<impl Fn(&SlideData) -> Option<&'a str>>,
Expand Down
2 changes: 1 addition & 1 deletion tbaPulseData.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tbapy

***REMOVED***
key = "Ab5I0k9SHkYT1FC4Yh5T2lpnjsewAsHNRUnoRLcnk7vueOW4VeNWf2NMBzfGsDeN"
event_key = "2024cc" # TESTING! change to your event key when using at events

tba = tbapy.TBA(key)
Expand Down

0 comments on commit 7ae991c

Please sign in to comment.