Giter Club home page Giter Club logo

transip.net's Introduction

TransIP.NET

A client library for the TransIP API

GitHub issues license NuGet bunq.me

A .Net Core client library for the TransIP Api, based on the original work of jwvdiermen.

Installation

NuGet:

PM> Install-Package TransIP.NET

Usage example

Here are some code example on how to use the TransIP.NET package, currently only the DomainService is supported.

using TransIp.Api;
using TransIp.Api.Dto;

//
// Retrieve current DNS entries and add a record
//
var domainService = new DomainService("YourUsername", ClientMode.ReadWrite, "YourPrivateKey");

var info = await domainService.GetInfoAsync("example.com");
var entries = info.DnsEntries.ToList();
entries.Add(new DnsEntry
{
	Name = "local",
	Type = DnsEntryType.A,
	Expire = 3600, // 1 hour
	Content = "127.0.0.1"
});
await domainService.SetDnsEntriesAsync("example.com", entries.ToArray());

Release History

  • 1.1.0
    • Added async methods
    • Added ToString() method for DnsEntry
  • 1.0.0
    • Initial release

TODO

  • Add other services
  • Re-add unit tests
  • Write more example code

Contributing

  1. Fork it (https://github.com/WouterJanson/TransIP.NET/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Credits

Thanks to jwvdiermen for the initial version 4 years ago.

transip.net's People

Contributors

jwvdiermen avatar jwvdiermen1 avatar koenvzeijl avatar peterhagen avatar wouterjanson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

transip.net's Issues

IOException: -----END PRIVATE KEY not found

Hey, I'm having some troubles getting the API running, when I simply try to initialize the API and try to get all TLD's I get this error, stating no private key could be found:

I added the key as a VS Secret, and when that didn't work out I tried directly inserting it hard-coded in my MVC controller, didn't do the job either..

Code:
DomainService = new DomainService(username, ClientMode.ReadWrite, key);
Followed by:
DomainService.GetAllTldInfos()

Error:

IOException: -----END PRIVATE KEY not found
Org.BouncyCastle.Utilities.IO.Pem.PemReader.LoadObject(string type)
Org.BouncyCastle.Utilities.IO.Pem.PemReader.ReadPemObject()
Org.BouncyCastle.OpenSsl.PemReader.ReadObject()
TransIp.Api.EncryptionHelper.Encrypt(byte[] digest, string key)
TransIp.Api.EncryptionHelper.Sign(string privateKey, object[] args)
TransIp.Api.ClientBase<TClientType, TChannelType>.SetSignatureCookies(string method, object[] args)
TransIp.Api.DomainService.GetAllTldInfos()

Is this package not compatible with Dotnet Core 3.1 / C#8?
Or am I doing something wrong ๐Ÿ˜…

Hope you can help me out! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.