Threads.Lib
1.0.0-beta-001
See the version list below for details.
dotnet add package Threads.Lib --version 1.0.0-beta-001
NuGet\Install-Package Threads.Lib -Version 1.0.0-beta-001
<PackageReference Include="Threads.Lib" Version="1.0.0-beta-001" />
paket add Threads.Lib --version 1.0.0-beta-001
#r "nuget: Threads.Lib, 1.0.0-beta-001"
// Install Threads.Lib as a Cake Addin #addin nuget:?package=Threads.Lib&version=1.0.0-beta-001&prerelease // Install Threads.Lib as a Cake Tool #tool nuget:?package=Threads.Lib&version=1.0.0-beta-001&prerelease
F# Library for the Threads API
For the Threads API docs check out https://developers.facebook.com/docs/threads where this is based from.
// script.fsx
#r "nuget: Threads.Lib"
open Threads.Lib
open Threads.Lib.Profile
async {
let threads = Threads.Create("access-token")
let! (response: ProfileValue seq) =
threads.Profile.FetchProfile(
profileId = "me",
profileFields = [
ProfileField.Id
ProfileField.Username
ProfileField.ThreadsBiography
ProfileField.ThreadsProfilePictureUrl
]
)
printfn $"%A{response}"
(*
[ ProfileValue.Id "1234567890"
ProfileValue.Username "johndoe"
ProfileValue.ThreadsBiography "I'm a cool guy"
ProfileValue.ThreadsProfilePictureUrl (Uri "https://example.com/picture.jpg")
]
*)
}
|> Async.RunSynchronously
dotnet run script.fsx
should print the profile response.
For more information, check out the docs at https://angelmunoz.github.io/Threads.Lib/
Build locally
`dotnet fsi build.fsx -- -p build
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Flurl (>= 4.0.0)
- Flurl.Http (>= 4.0.2)
- FSharp.Core (>= 8.0.102)
- FsToolkit.ErrorHandling (>= 4.16.0)
- FsToolkit.ErrorHandling.TaskResult (>= 4.16.0)
- Thoth.Json.Net (>= 12.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta-002 | 49 | 11/5/2024 |
1.0.0-beta-001 | 50 | 11/5/2024 |
### Added
* - Threads Client
* - Media Service - service to pull down media objects (threads posts)
* - Post Service - service that allows you to create media containers to post threads to threads.net
* - Profile Service - Service that allows you to pull information from a threads profile
* - Reply Management Service - Service that allows you to manage replies to threads or pull replies from threads
* - Insights Service - Service that allows you to pull insights from threads