Details
-
AboutThis is a test
-
SkillsPython, Nodejs, C++, JS, HTML, CSS, C#s
-
LocationWilderness
-
Website
-
Github
Joined devRant on 5/23/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@Scramjet https://devrant.com/collabs/...
then i just checked what API calls are being made for the stuff that isn't documented -
@Scramjet the project or devrants API?
-
@C0D4 well if they did. I look like a dumbass hahaha
-
Damn can't post another rant due to limits. Hopefully those who see this comment will head over to https://github.com/Jirubizu/... and give it a star :)
-
@C0D4
Yeah there is. So from the testing I got the following output.
Rant = 1,
Undefined = 2,
MemeJoke = 3,
Question = 4,
Devrant = 5,
Random = 6 -
@12bitfloat I am sorry, I am almost done with them. I just needed to find out what 1-6 of type actually meant in the api
-
@C0D4 So i have the following atm,
public T? PostXForm<T>(string url, HttpContent content)
{
content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
HttpResponseMessage result = _httpClient.PostAsync(url,null).Result;
return JsonConvert.DeserializeObject<T>(result.Content.ReadAsStringAsync().Result);
}
and
HttpContent content = new FormUrlEncodedContent(
new List<KeyValuePair<string, string>> {
new("app", "3"),
new("rant", HttpUtility.UrlEncode(rant)),
new("type", type.ToString()),
new("token_id", DevrantAuth.AuthData.Id.ToString()),
new("token_key", DevrantAuth.AuthData.Key),
new("user_id", DevrantAuth.AuthData.UserId.ToString())
}
);
return _httpClient.PostXForm<PostRantResponse>("devrant/rants", content) ?? new PostRantResponse();
But still no go -
@C0D4 Yeah
This is the response I get from the API,
{"success":false,"error":"Invalid app id specified."} -
@C0D4 I am writing an API for C#
```
string url = $"devrant/rants?app=3&rant={rant}&type={type}" +
$"&token_id={DevrantAuth.AuthData.Id}&token_key={DevrantAuth.AuthData.Key}&user_id={DevrantAuth.AuthData.UserId}";
return _httpClient.Post<PostRantResponse>(url) ?? new PostRantResponse();
``` -
@C0D4 so I have been using that. However, the posting rants seem to be broken. Even using the built in console. I am unable to post rants via the API.
-
@jjimenez you can try algorithms do coursework etc internet it just a helping hand but you can still do a lot with power
-
@gronostaj that's true but we need electricity too 🤣
-
@Stuxnet yeah that was the approach I was going for, guess my English is still shit
-
@Stuxnet not what I was trying to portray. I myself know I am not better than anyone as I still have a lot to learn myself, however, it is the attitude of not trying to search for the answer yourself first through either trial and error or reading online before asking someone who is already doing something for you. If he had gone and researched or even written broken code and showed it to me I wouldn't have cared I would've helped but the thing is it didn't feel like he tried anything he didn't even have code to show me or what he was searching about. I feel like I'm going to have to defend myself the whole time for this post but oh well.
Sorry to make it seem like a duck post on all the learners. It's not it's just on those select few that don't try to do things themselves first once they know they have someone else who can do it for them -
@bahua you gotta give some people the benefit of the doubt
-
This is one thing I am worried about when I get my first job as I wouldn't know how much authority i have in talking back to the other person :/
-
@beegC0de actually it's common for businesses to put them on and they usually sell old hardware but don't remove shit like that as they're lazy
-
@electrineer yeah already did mine doesn't it's locked on two chips so I would have to change chips or rewrite them with unlocked bios
-
Usually play just TV shows that I've watched before so I don't have to focus on what's happening as I have already seen it and music wise is mainly lofi or 90s Japanese music (I think I enjoy this a little bit too much)