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 9b08e53 + b93ef32 commit 9b068bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 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***"
***REMOVED***
},
)

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***"}
***REMOVED***


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

0 comments on commit 9b068bf

Please sign in to comment.