Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lindexi/sm.ms

Sm.ms image upload sdk
https://github.com/lindexi/sm.ms

dotnet dotnet-core dotnet-standard imageshack smms uwp wpf

Last synced: 22 days ago
JSON representation

Sm.ms image upload sdk

Awesome Lists containing this project

README

        

# Sm.ms

| Build | NuGet |
|--|--|
|![](https://github.com/lindexi/Sm.ms/workflows/.NET%20Core/badge.svg)|[![](https://img.shields.io/nuget/v/smms)](https://www.nuget.org/packages/smms)|

## Getting Started

NuGet install:

```csharp
dotnet add package smms
```

Create a Smms object and set the api token

```csharp
using Sm.ms

var smms = new Smms("xxx");
```

And you can generate the api token form [https://sm.ms/home/apitoken](https://sm.ms/home/apitoken)

And then you can upload the image and receive the result string

```csharp
var file = new FileInfo(@"F:\lindexi\logo.png");
Console.WriteLine(await smms.UploadImage(file.OpenRead(), file.Name));
```