// Get news post
use osynic_osuapi::error::Result;
use osynic_osuapi::v2::client::request::client::OsynicOsuApiV2Client;
use osynic_osuapi::v2::interface::news::INews;
use osynic_osuapi::v2::model::oauth::structs::o_token::OToken;

#[tokio::main]
async fn main() -> Result<()> {
    dotenvy::dotenv().ok();
    let access_token = std::env::var("ACCESS_TOKEN").expect(
        "Please set the ACCESS_TOKEN environment variable to a valid osu! API v2 access token",
    );
    let client = OsynicOsuApiV2Client::new(OToken {
        access_token,
        refresh_token: None,
        expires_in: 86400,
        token_type: "Bearer".to_string(),
    });
    let news = client
        .news
        .get_news_post("2021-04-27-results-a-labour-of-love".to_string(), None)
        .await?;
    println!("{:?}", news);
    Ok(())
}

/*
Reqwestnews get_news
News {
    id: 943,
    author: "pishifat",
    edit_url: "https://github.com/ppy/osu-wiki/tree/master/news/2021/2021-04-27-results-a-labour-of-love.md",
    first_image: "https://i.ppy.sh/65c9c2eb2f8d9bc6008b95aba7d0ef45e1414c1e/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032302d31312d33302d612d6c61626f75722d6f662d6c6f76652f616c6f6c5f636f7665722e6a7067",
    published_at: "2021-04-27T20:00:00+00:00",
    updated_at: "2025-03-24T14:10:19+00:00",
    slug: "2021-04-27-results-a-labour-of-love",
    title: "Results - A Labour of Love",
    content: "<div class='osu-md osu-md--news'><p class=\"osu-md__paragraph\">Votes are tallied and locked in. Discover who won this contest celebrating one of osu!'s most memorable beatmaps!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/65c9c2eb2f8d9bc6008b95aba7d0ef45e1414c1e/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032302d31312d33302d612d6c61626f75722d6f662d6c6f76652f616c6f6c5f636f7665722e6a7067\" alt=\"\" /></p>\n<p class=\"osu-md__paragraph\">In case you're new around here, <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/beatmapsets/163112\"><strong>Kuba Oms - My Love</strong></a> is that &quot;memorable beatmap&quot;. Participants of the <a class=\"osu-md__link\" href=\"/wiki/en/Contests/A_Labour_of_Love_Contest\">A Labour of Love</a> contest created a full beatmap experience around <em>My Love</em>, including each of these elements:</p>\n<ul class=\"osu-md__list\">\n<li class=\"osu-md__list-item\"><div>Remix of <strong>Kuba Oms - My Love</strong>\n</div></li>\n<li class=\"osu-md__list-item\"><div>Beatmap spread of the remix</div></li>\n<li class=\"osu-md__list-item\"><div>Storyboard or custom video</div></li>\n</ul>\n<p class=\"osu-md__paragraph\">After 5 months of hard work from creators and judges along with votes from thousands of osu! players, we're stoked to recap the outcome of osu!'s most ambitious contest yet!</p>\n<h2 class=\"osu-md__header osu-md__header--2\" id=\"live-stream-showcase\">Live stream showcase</h2>\n<p class=\"osu-md__paragraph\">If text isn't your style, we live streamed a reveal of the contest results on <a class=\"osu-md__link\" href=\"https://www.twitch.tv/videos/1000707526\">our Twitch channel</a> the other day. Below, you can watch the top 8 entries alongside live chat reactions, quick interviews with the winners, and commentary from <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/3178418\">pishifat</a>, <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/102335\">Ephemeral</a> and <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/1314547\">Uberzolik</a>:</p>\n<iframe src=\"https://player.twitch.tv/?video=1000707526&parent=osu.ppy.sh&autoplay=false\" frameborder=\"0\" allowfullscreen=\"true\" scrolling=\"no\" height=\"378\" width=\"100%\"></iframe>\n<p class=\"osu-md__paragraph\">Read on for a summary of the results!</p>\n<h2 class=\"osu-md__header osu-md__header--2\" id=\"community-vote-results\">Community vote results</h2>\n<p class=\"osu-md__paragraph\">Remember when we asked you to vote for your favourite 2 contest entries <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/home/news/2021-03-26-a-labour-of-love-voting-open\">here</a>? Well, we received a MASSIVE <strong>7224</strong> total votes spread across the 8 submissions!</p>\n<p class=\"osu-md__paragraph\">Proving to the world that you don't need a crazy 7 star map to win the love of osu! players, <em>Team Red but Blue</em>'s entry <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/beatmapsets?q=My%20Love%20%28Redside%20Remix%29%20%28feat.%20Hatsune%20Miku%29\"><strong>Kuba Oms - My Love (Redside Remix)</strong></a> dominated the community vote with a 300 point lead!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/b049f8eb9bbf7bfdc275eee8b1df21d1973ba200/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f636f6d6d756e6974795f766f74652e706e67\" alt=\"Team Red but Blue results\" /></p>\n<p class=\"osu-md__paragraph\">This mapset has everything you could possibly ask for: a 3-difficulty spread by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/1541323\">Noffy</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/7427035\">Chompy</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/12577911\">Zer0-G</a> calling back to the original <em>My Love</em> mapset, an iconic key visual designed by osu! fanart contest legend <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/4817223\">Tofumang</a>, a stunning video fashioned by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/1541323\">Noffy</a>, and a universally appealing remix produced by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/16039046\">Redside</a> (with an extra vocaloid touch by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/1541323\">Noffy</a> once again)!</p>\n<p class=\"osu-md__paragraph\">Each team member has been rewarded the community pick profile badge for their well-deserved win.</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/5e74bc800e41e58906640181076c4ce1445e774c/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f616c6f6c5f636f6d6d756e6974797069636b32782e706e67\" alt=\"Community pick badge\" /></p>\n<p class=\"osu-md__paragraph\">See full results for the community vote from the <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/community/contests/115\">contest listing</a>.</p>\n<h2 class=\"osu-md__header osu-md__header--2\" id=\"judge-results\">Judge results</h2>\n<p class=\"osu-md__paragraph\">Alongside the community vote, we asked a curated group of 18 experienced mappers and musicians to give their input on the entries as well! See the panelists from <a class=\"osu-md__link\" href=\"/wiki/en/Contests/A_Labour_of_Love_Contest#prizes\">A Labour of Love's wiki page</a>.</p>\n<p class=\"osu-md__paragraph\">Following a format similar to <a class=\"osu-md__link\" href=\"/wiki/en/Contests/Monthly_Beatmapping_Contest#screening\">Monthly Beatmapping Contest screening</a>, each of the judges selected their ordered top 5 entries focusing on their area of expertise (mapping or music production). Each position in a judge's top 5 was assigned a number (first place = 5 points, second place = 4 points, etc.), and the sum of these selections made up the mapping and musician panel results.</p>\n<p class=\"osu-md__paragraph\">The overall panel followed the same format with contribution from all judges. Their top 5 picks were based on an evaluation of the full beatmap package (song remix, beatmap, visuals, and general cohesiveness of the elements). To balance out the 6 musician-focused panelists with the 12 mapping-focused panelists, musicians were given more weight in the overall category.</p>\n<p class=\"osu-md__paragraph\">A full overview of judge results can be found <a class=\"osu-md__link\" href=\"https://docs.google.com/spreadsheets/d/e/2PACX-1vTts0zpdjKdCUS3oCP4XZ18vh5ckEDqL_Jvy2eh0B4kC8je09bCGwYcpOWgjaXXy0251c3f33u7BDjv/pubhtml\">here</a> and on the <a class=\"osu-md__link\" href=\"/wiki/en/Contests/A_Labour_of_Love_Contest#prizes\">A Labour of Love wiki page</a></p>\n<h3 class=\"osu-md__header osu-md__header--3\" id=\"overall-runner-up\">Overall runner-up</h3>\n<p class=\"osu-md__paragraph\">Team <em>schoolboy fans</em> takes the contest's theme of celebrating a classic beatmap to its limit with their submission <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/beatmapsets/1382412\"><strong>Kuba Oms - My Love (Shadren Remix)</strong></a>!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/0c961bfa308aa619ead53ff5dc7ffc1e7e3c2327/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f72756e6e657275702e706e67\" alt=\"Overall runner-up badge\" /></p>\n<p class=\"osu-md__paragraph\">Nostalgia is the name of the game with this entry. Sporting a retro synthwave remix by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/745494\">Shadren</a>, a simply classic beatmap spread of Easy through Insane by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/5504231\">Shmiklak</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/745494\">Shadren</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/5596337\">Daycore</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/6339790\">wajinshu</a>, and an absolute masterpiece of a storyboard by Shmiklak, this submission brings you back to your cherished osu! memories from years past.</p>\n<p class=\"osu-md__paragraph\">While it may not have scored especially high from either the mapper or musician panels alone, factoring in the storyboard is what pushed this entry above the crowd. For creating their overall solid submission, everyone on team <em>schoolboy fans</em> received the overall runner-up profile badge!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/888e4574e34ac8cbbfb24843748ba137c0950103/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f616c6f6c5f6f766572616c6c72756e6e657275704032782e706e67\" alt=\"Overall runner-up badge\" /></p>\n<p class=\"osu-md__paragraph\">Seeing as the <em>Elite Storyboarder</em> title wasn't awarded to anyone in the overall winning team, we've passed down the title to <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/5504231\">Shmiklak</a> for their outstanding creativity in this contest (along with their vast experience with storyboarding elsewhere of course!).</p>\n<h3 class=\"osu-md__header osu-md__header--3\" id=\"overall-winner\">Overall winner</h3>\n<p class=\"osu-md__paragraph\">Taking the breath away from mappers and musicians across the board, team <em>extremely valid</em> wears the heart-shaped crown with their submission <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/beatmapsets/1388906#osu/2868388\"><strong>Raphlesia &amp; BilliumMoto - My Love</strong></a>!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/3e85184cd515667581279f6fd169f45f13c70776/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f6f766572616c6c2e6a7067\" alt=\"Overall runner-up badge\" /></p>\n<p class=\"osu-md__paragraph\">Yep, that's right. This entry received #1 in the musician-focused panel, the mapping panel, and the overall panel. With just a few more votes they could've even taken the community vote — insane, right?</p>\n<p class=\"osu-md__paragraph\">This remix by <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/8984574\">Shinwoir</a> (a.k.a. Raphlesia) and <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/3862471\">BilliumMoto</a> is practically perfect for a rhythm game setting, and who would've expected less from a combo involving the last <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/community/contests/1\">osu! remix contest</a> winner? <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/2204515\">Mao</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/4966334\">DeviousPanda</a> / <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/918297\">Realazy</a> took full advantage of this perfect track too, crafting a 6-difficulty spread that appeals to players on every level with stellar performances from everyone involved. While this entry's storyboard was a bit lackluster compared to the other entries, this one clearly focused on the other aspects and managed to make it work anyway.</p>\n<p class=\"osu-md__paragraph\">Given their landslide of a win on the judging side of things, it's more than fitting to reward everyone on team <em>extremely valid</em> with the overall winner profile badge!</p>\n<p class=\"osu-md__figure-container\"><img class=\"osu-md__figure-image\" src=\"https://i.ppy.sh/aeab70d14c1e3ccc1c6bff304d5b58790144e2a6/68747470733a2f2f6f73752e7070792e73682f77696b692f696d616765732f7368617265642f6e6577732f323032312d30342d32372d726573756c74732d612d6c61626f75722d6f662d6c6f76652f616c6f6c5f6f766572616c6c77696e6e65724032782e706e67\" alt=\"Overall winner badge\" /></p>\n<p class=\"osu-md__paragraph\">On top of this, each member of the team has earned a forum title to honour their win:</p>\n<ul class=\"osu-md__list\">\n<li class=\"osu-md__list-item\"><div>\n<a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/3862471\">BilliumMoto</a>: osu!mixer II</div></li>\n<li class=\"osu-md__list-item\"><div>\n<a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/8984574\">Shinwoir</a>: osu!mixer</div></li>\n<li class=\"osu-md__list-item\"><div>\n<a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/2204515\">Mao</a>: Elite Mapper II</div></li>\n<li class=\"osu-md__list-item\"><div>\n<a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/4966334\">DeviousPanda</a>: Elite Mapper</div></li>\n<li class=\"osu-md__list-item\"><div>\n<a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/918297\">Realazy</a>: Elite Mapper</div></li>\n</ul>\n<p class=\"osu-md__paragraph\">Given <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/3862471\">BilliumMoto</a> and <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/users/2204515\">Mao</a> already earned these user titles from different contests, they've been granted the <em>II</em> suffix. Double congrats to them!</p>\n<h2 class=\"osu-md__header osu-md__header--2\" id=\"conclusion\">Conclusion</h2>\n<p class=\"osu-md__paragraph\">Congratulations again to all the winners and thanks to everyone who participated in A Labour of Love!</p>\n<p class=\"osu-md__paragraph\">We hope this contest has been as fun for you as it has been for us. Community members joining together to produce something cool has been the spirit of osu! since the very beginning, and it's awesome to see that feeling shine through in every submission (...except maybe <a class=\"osu-md__link\" href=\"https://osu.ppy.sh/beatmapsets/1348553\">this one</a>, sorry team <em>Down</em>).</p>\n<p class=\"osu-md__paragraph\">This may be the end for A Labour of Love, but there's no doubt that another contest focused on the full beatmap experience will fill its shoes one day. It's rare for a contest to connect with so many different people throughout the osu! world like this one has, and we look forward to fully embracing that again at some point in the future.</p>\n<p class=\"osu-md__paragraph\">See you next time.</p>\n<p class=\"osu-md__paragraph\">—pishifat</p>\n</div>",
    navigation: Navigation {
        newer: Some(Newer {
            id: 944,
            author: "pishifat",
            edit_url: "https://github.com/ppy/osu-wiki/tree/master/news/2021/2021-04-28-new-featured-artist-emilles-moonlight-serenade.md",
            first_image: "https://i.ppy.sh/7e22cc5f4755c21574d999d8ce3a2f40a3268e84/68747470733a2f2f6173736574732e7070792e73682f617274697374732f3136302f6865616465722e6a7067",
            published_at: "2021-04-28T08:00:00+00:00",
            updated_at: "2025-03-16T17:53:26+00:00",
            slug: "2021-04-28-new-featured-artist-emilles-moonlight-serenade",
            title: "New Featured Artist: Emille's Moonlight Serenade"
        }),
        older: Some(Older {
            id: 942,
            author: "pishifat",
            edit_url: "https://github.com/ppy/osu-wiki/tree/master/news/2021/2021-04-24-new-featured-artist-grynpyret.md",
            first_image: "https://i.ppy.sh/acdce813b71371b95e8240f9249c916285fdc5a0/68747470733a2f2f6173736574732e7070792e73682f617274697374732f3135392f6865616465722e6a7067",
            published_at: "2021-04-24T08:00:00+00:00",
            updated_at: "2025-03-15T23:38:37+00:00",
            slug: "2021-04-24-new-featured-artist-grynpyret",
            title: "New Featured Artist: Grynpyret"
        })
    }
}
*/
