Threads.Lib
1.0.0-beta-002
This is a prerelease version of Threads.Lib.
dotnet add package Threads.Lib --version 1.0.0-beta-002
NuGet\Install-Package Threads.Lib -Version 1.0.0-beta-002
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Threads.Lib" Version="1.0.0-beta-002" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Threads.Lib --version 1.0.0-beta-002
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Threads.Lib, 1.0.0-beta-002"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Threads.Lib as a Cake Addin #addin nuget:?package=Threads.Lib&version=1.0.0-beta-002&prerelease // Install Threads.Lib as a Cake Tool #tool nuget:?package=Threads.Lib&version=1.0.0-beta-002&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
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 |
### Fixed
* - Fix insights requests parameter names and serialization issues