I'm a Mexican engineer who enjoys coding.
I mostly write code in Go and PHP.
๐ซ You can reach me on twitter: @VictorAvelar
๐ญ Iโm currently working as Engineering Manager at @commercetools
A go client for the dev.to API
Home Page: https://docs.dev.to/api/
License: MIT License
I'm a Mexican engineer who enjoys coding.
I mostly write code in Go and PHP.
๐ซ You can reach me on twitter: @VictorAvelar
๐ญ Iโm currently working as Engineering Manager at @commercetools
Hi!
Looks like the ArticleUpdate
in types.go does not match the latest payloads for CreateArticle and UpdateArticle of the Devto API reference.
The error that appears when trying to update or create is a 422:
{"error":"article param must be a JSON object. You provided article as NilClass","status":422}
What devto-api-go currently produces:
{
"title": "Hello, World!",
"published": true,
"body_markdown": "Hello DEV, this is my first post",
"tags": ["discuss", "help"],
"series": "Hello series",
"canonical_url": "https://example.com/blog/hello",
"organization_id": 1234,
"main_image": "foo.png",
"description": "some description"
}
What the API now requires:
{
"article": {
"title": "Hello, World!",
"published": true,
"body_markdown": "Hello DEV, this is my first post",
"tags": ["discuss", "help"],
"series": "Hello series",
"canonical_url": "https://example.com/blog/hello",
"organization_id": 1234
}
}
Diff:
diff --git a/Untitled-1.json b/Untitled-2.json
index f1b7617..a636b7c 100644
--- a/Untitled-1.json
+++ b/Untitled-2.json
@@ -1,11 +1,11 @@
{
- "title": "Hello, World!",
- "published": true,
- "body_markdown": "Hello DEV, this is my first post",
- "tags": ["discuss", "help"],
- "series": "Hello series",
- "canonical_url": "https://example.com/blog/hello",
- "organization_id": 1234,
- "main_image": "foo.png",
- "description": "some description"
+ "article": {
+ "title": "Hello, World!",
+ "published": true,
+ "body_markdown": "Hello DEV, this is my first post",
+ "tags": ["discuss", "help"],
+ "series": "Hello series",
+ "canonical_url": "https://example.com/blog/hello",
+ "organization_id": 1234
+ }
}
@VictorAvelar Do you think I could try to contribute a fix?
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.