anderly / dnsimple-csharp Goto Github PK
View Code? Open in Web Editor NEWA C# wrapper for the DNSimple REST API
License: Apache License 2.0
A C# wrapper for the DNSimple REST API
License: Apache License 2.0
The updates you merged into master aren't in the nuget package. If I run from master everything works. If I use the nuget package I get RestSharp errors
Thanks
Howdy Andery - wondering what your intentions are as to converting over to netstandard. Do you take PR's?
I see this client is currently using API v1. API v1 will be shut down at the end of May.
I don't have the knowledge or resources to provide a PR, but I'll be more than happy to assist if you have any questions about API v2.
For curiosity, do you have any plan to support API v2?
I am a newbie to this library and DnSimple.
Did the API change or is there an error that is not yet raised?
I am running a pretty basic test via Postman and am getting the following error from the following code. I get the error both authenticating with password or token and also with either version of JxonFx (the original - 2.0.1106.2610) or the new one (2.0.1298.2802).
Code:
var dns = new DNSimpleRestClient("[email protected]", null", "SomeTokenHere);
dynamic result = dns.AddDomain(domain);
Error Returned:
{
"message": "An error has occurred.",
"exceptionMessage": "Method 'Deserialize' in type 'DNSimple.Infrastructure.JsonFxDeserializer' from assembly 'DNSimple.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.",
"exceptionType": "System.TypeLoadException",
"stackTrace": " at DNSimple.DNSimpleRestClient..ctor(String username, String password, String token)\r\n at xyz.DomainsController.CreateDomain(String domain) in path\to\controller\DommainsController.cs:line 95\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}
Strangely enough I think I am also getting an error submitting directly to the site but am not sure if I am just doing something wrong. Using postman:
POST /v1/domains HTTP/1.1
Host: api.dnsimple.com
X-DNSimple-Token: [email protected]:SomeTokenHere
Cache-Control: no-cache
{
"domain": {
"name": "example.com"
}
}
400 message being returned:
{
"message": "Required parameter missing: domain"
}
{
"message": "Required parameter missing: domain"
}
Getting the following error.
Additional information: Could not load type 'RestSharp.HttpBasicAuthenticator' from assembly 'RestSharp, Version=105.2.3.0, Culture=neutral, PublicKeyToken=null'.
I think its probably the same as https://stackoverflow.com/questions/32180366/could-not-load-type-restsharp-authenticators-httpbasicauthenticator-from-assem
and the references just need to be updated?
When i tried to get the list of my domain names using the C# api library. It returns me to that message
"JIT Compiler encountered an internal limitation."
Hello,
The ability to add a template would be great and seems like a really simple addition. Is this something you could add or I could attempt to do?
I don't think getting into the weeds of creating and modifying templates is needed, but the ability to apply a template to a domain programmatically would be great.
http://developer.dnsimple.com/templates/applied/
Thanks!
It would be useful to have a get list of records based on the record_type. Are you open to having a method created to handle that? Would be really nice.
If so, how would you like to move forward with making/proposing changes? You do it yourself or have it submitted via a pull request?
Thanks
Hello,
Do you have an example on how to get the status code returned by the api calls?
Trying to show the raw message returned if "not" OK and serialize the results otherwise.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.