Suns game threads, Mainstreet

Mainstreet

Cruisin' Mainstreet
Supporting Member
Joined
Oct 19, 2003
Posts
133,600
Reaction score
73,896
Hi, I’m stepping back from initiating Suns game threads. The All-Star Weekend appears to be a good time to do it.

I plan to remain active in the forum and assist when necessary, but I’m hoping someone will take on these duties or minimally it can be shared.

Regardless, I've really enjoyed doing the game threads over the years. Thanks for allowing me this privilege.
 

Chaplin

Better off silent
Joined
May 13, 2002
Posts
48,821
Reaction score
20,221
Location
Round Rock, TX
There's got to be an automated way to create threads. I know there are some ways to do it with Xenforo message boards, but unsure about doing it for game threads, but it's gotta exist somewhere. Just not sure how the timing works and how customizable the thread text would be if opened automatically. Might be ways to do it by connecting to an ESPN API or something.
 

ASUCHRIS

ONE HEART BEAT!!!
Joined
Sep 2, 2002
Posts
20,996
Reaction score
22,851
Hi, I’m stepping back from initiating Suns game threads. The All-Star Weekend appears to be a good time to do it.

I plan to remain active in the forum and assist when necessary, but I’m hoping someone will take on these duties or minimally it can be shared.

Regardless, I've really enjoyed doing the game threads over the years. Thanks for allowing me this privilege.
Sad you're stepping back. Hope you continue to share as much as you are able.
 

Chaplin

Better off silent
Joined
May 13, 2002
Posts
48,821
Reaction score
20,221
Location
Round Rock, TX
I got this from AI, but I'm not smart enough to figure it out:

Automating Phoenix Suns game threads on a XenForo message board involves using a combination of an NBA data source (to know when games happen), a scripting language (like Python), and the XenForo REST API (to create the threads).
Here is a step-by-step guide to setting up this automation.

1. Prerequisites
  • XenForo Admin Access: You need to be an administrator to generate an API key.
  • Programming Knowledge: Familiarity with Python or PHP is required for scripting.
  • A Hosting Environment: A server or computer running 24/7 (like a Raspberry Pi, VPS, or serverless function) to run the script.

2. Configure XenForo API
  1. Generate API Key: In your XenForo Admin Control Panel, go to Setup > API keys and create a new key.
  2. Set Permissions: Give the key permissions to create threads (thread:write) and read forums (node:read).
  3. Identify Node ID: Find the node_id (Forum ID) where you want the game threads to be posted.

3. Automate Data Acquisition (Suns Schedule)
You need a data source to know when the Suns play.
  • NBA API: Use Python to query NBA API endpoints (such as data.nba.net/10s/prod/v1/ or ://cdn.nba.com) to get game data.
  • GameID: For every game, you need the 10-digit game ID to get matchups and times.

4. Create the Automation Script (Python Example)
Create a Python script that runs daily. It should:
  1. Check if the Suns play today.
  2. Fetch the opponent and game time.
  3. Format the title (e.g., [GAME THREAD] Phoenix Suns vs. [Opponent] - [Date]).
  4. Send a POST request to your XenForo API endpoint.
Basic API Request Structure:

http
POST <YOUR_FORUM_URL>/api/threads/
Header: XF-Api-Key: <YOUR_API_KEY>
Data:
node_id: <FORUM_ID>
title: "[GAME THREAD] Phoenix Suns vs. Opponent"
message: "Game starts at X Time. Discuss here!"

5. Scheduling and Timing
  • Run Frequency: Use a cron job on Linux to run the script once daily, or a few hours before the game.
  • Alternative: Use automation services like Make (formerly Integromat) or Zapier to monitor a calendar or RSS feed and trigger the thread creation.

6. Avoiding Issues
  • Bot Detection: To prevent being blocked, ensure your script doesn't spam the forum. Add reasonable delays if posting multiple threads.
  • Duplicate Threads: Ensure your script checks if a thread for that game already exists before posting a new one.
  • Permissions: You may need to create a dedicated user account for the bot and set permissions so it can post without moderation.
 

BooksOrangePlanet

I was BirdGangThing
Supporting Member
Joined
Dec 27, 2019
Posts
39,865
Reaction score
44,929
Location
Arcadia
@BooksOrangePlanet has kindly offered to do the game threads for the Suns. I think he will do a great job.

Please welcome him in this role if no one else is interested.

Thanks, Mainstreet

thx main - we're gonna keep the time honored mainstreet format - thx for doing it all these years bro - much appreciated
 

Germz249

Hall of Famer
Joined
Feb 17, 2020
Posts
1,674
Reaction score
2,617
Location
Gilbert
Hi, I’m stepping back from initiating Suns game threads. The All-Star Weekend appears to be a good time to do it.

I plan to remain active in the forum and assist when necessary, but I’m hoping someone will take on these duties or minimally it can be shared.

Regardless, I've really enjoyed doing the game threads over the years. Thanks for allowing me this privilege.

Thanks for all your hard work. You can always help with being a Suns insider.
 
Top