Skip to content

Commit b048d92

Browse files
committed
initial commit
1 parent 3e0cc71 commit b048d92

File tree

8 files changed

+145
-2
lines changed

8 files changed

+145
-2
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
github: chriskapp
3+
patreon: fusio
4+
custom: https://www.paypal.me/fusioapi

.github/workflows/sdkgen.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: SDKgen
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
typehub_message:
6+
description: "The TypeHub commit message on commit"
7+
required: false
8+
typehub_version:
9+
description: "The TypeHub version on tag"
10+
required: false
11+
typehub_changelog:
12+
description: "The TypeHub changelog on tag"
13+
required: false
14+
permissions:
15+
contents: 'write'
16+
jobs:
17+
generate:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: apioo/sdkgen-generator-action@v0.2.1
22+
with:
23+
client_id: '${{ secrets.SDKGEN_CLIENT_ID }}'
24+
client_secret: '${{ secrets.SDKGEN_CLIENT_SECRET }}'
25+
typehub_message: '${{ inputs.typehub_message }}'
26+
typehub_version: '${{ inputs.typehub_version }}'
27+
typehub_changelog: '${{ inputs.typehub_changelog }}'
28+
publish:
29+
if: "${{ inputs.typehub_version != '' }}"
30+
needs: generate
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
- name: Setup .NET
36+
uses: actions/setup-dotnet@v3
37+
with:
38+
dotnet-version: '7.0.102'
39+
- name: Copy csproj
40+
run: cp ./project.csproj ./src/SdkFabric./SdkFabric..csproj
41+
- name: Set version
42+
run: sed -i 's/0.1.0/${{ inputs.typehub_version }}/g' ./src/SdkFabric./SdkFabric..csproj
43+
- name: Create and push NuGet package
44+
working-directory: ./src/SdkFabric.
45+
run: |
46+
dotnet pack -c Release
47+
dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Apioo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NuGet.Config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
6+
</packageSources>
7+
</configuration>

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
# twitter-csharp
2-
Twitter C# SDK managed by SDK Fabric
1+
2+
# Twitter SDK
3+
4+
This SDK is managed by the [SDK Fabric](https://sdk-fabric.org/) project.
5+
Our goal is to build a global infrastructure to automatically generate
6+
an SDK for every API, please take a look at our website for more information.
7+
8+
## Contribution
9+
10+
Please do not create a pull requests at this repository since the code is
11+
automatically generated. If an operation or type is missing at the client SDK
12+
please register at the [TypeHub](https://typehub.cloud/) platform and create
13+
a pull request at the [Twitter](https://app.typehub.cloud/d/sdkfabric/twitter)
14+
specification. The system will then automatically create a GIT commit and update
15+
the code.
16+
17+
## Usage
18+
19+
The following example shows how you can use the client:
20+
21+
```csharp
22+
CredentialsInterface credentials = new HttpBearer('[access_token]');
23+
Client client = Client::build(credentials);
24+
25+
// @TODO use the client
26+
```

logo.png

66.9 KB
Loading

project.csproj

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<PackageId>SdkFabric.</PackageId>
5+
<PackageVersion>0.1.0</PackageVersion>
6+
<Authors>chriskapp</Authors>
7+
<Company>Apioo</Company>
8+
<Description>Twitter C# SDK managed by SDK Fabric</Description>
9+
<Copyright>Christoph Kappestein</Copyright>
10+
<RepositoryUrl>https://github.com/sdk-fabric/twitter-csharp</RepositoryUrl>
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
<Nullable>enable</Nullable>
13+
<AssemblyName>sdk-fabric-twitter</AssemblyName>
14+
<PackageProjectUrl>https://sdk-fabric.org/</PackageProjectUrl>
15+
<PackageLicenseUrl>https://github.com/sdk-fabric/twitter-csharp/blob/main/LICENSE</PackageLicenseUrl>
16+
<RepositoryType>git</RepositoryType>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
18+
<PackageIcon>logo.png</PackageIcon>
19+
</PropertyGroup>
20+
<ItemGroup>
21+
<PackageReference Include="Sdkgen.Client" Version="0.1.7" />
22+
</ItemGroup>
23+
<ItemGroup>
24+
<None Include="..\..\logo.png">
25+
<Pack>True</Pack>
26+
<PackagePath>\</PackagePath>
27+
<Link>logo.png</Link>
28+
</None>
29+
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
30+
</ItemGroup>
31+
</Project>

sdkgen.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "client-csharp",
3+
"require": {
4+
"sdkfabric/twitter": {
5+
"target": "./src/SdkFabric.",
6+
"namespace": "SdkFabric."
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)