krusen / pinsharp Goto Github PK
View Code? Open in Web Editor NEW.NET client for working with the Pinterest API.
License: The Unlicense
.NET client for working with the Pinterest API.
License: The Unlicense
Hi Again,
Do I need to have my App approved by Pinterest to use your API?
What is the advantages of getting the App approved?
Thanks, Glenn
https://developers.pinterest.com/tools/access_token/
The page doesn't exist, does pinterest access toke take down?
I created a token for v5 of Pinterest but when calling PinSharpClient and adding the registered token the results are always null. Looks like the response is null. Can you please take a look at this? As of right now I can not read or post anything.
Hi,
awesome job on the library. I was able to pin stuff very quickly.
I'd like to automatically pin certain blog posts every day. The maximum number of daily pins would be 10. Do you, by any chance, have an idea if this is agains TOS? Don't want to get banned.
Is there a method to not only get the pinterest boards but also create boards?
When pinning an image, is there an overloaded method to pass the Title of the pin when the pin is created?
Hi,
How to catch API Rate Limit Exception? We have PinterestAPIException block, but whenever rate limit exceeds this will hit to Generic catch block and shows exception message as "Value cannot be null".
Please let me know how to check Current Limit, Remaining Limit using PinSharp.
Hello ..
I've used the Updated way to generate an access token using postman .. and got my access token and used it in the extension of you ,,,, not works !
can you please check that if this works with you and thanks in advance!
Hi
when i am trying to fetch pins from board named deepthr3e/virtual-reality-video-gaming I found that when fetching a specific pin the exception thrown "Error reading string. Unexpected token: StartObject. Path 'attribution.embed', line 1, position 425." i investigate the error and found that the issue
in the specific pin we have an object named "Attribution" and in this object have an object named "embed
"and your code doesn't have this object
here an image of the hierarchy of the json of pins https://s3.postimg.org/gui81hpyb/Capture.png
this is the full address of board: https://www.pinterest.com/abolhasani1149/error-board/
and this is the very pin that causes the issue: https://www.pinterest.com/pin/679128818779898527/
Here is my code. I have my app set up but get the Authorization Failed exception message when trying to get the boards. Please Advise.
private async void GetBoardsBTN_ClickAsync(object sender, EventArgs e)
{
// Create a client with your access token
var client = new PinSharpClient("APP SECRET");
// Get boards of the user associated with the access token
var boards = await client.Me.GetBoardsAsync(); // Throws Authorization Failed exception
}
Hi,
Can you please tell me how to get an access token. The link at https://developers.pinterest.com/tools/access_token/ does not work.
Thanks, Glenn
I have been using your wonderful library for months now with no problems. But now every time I call the function below, PinSharp throws and "Invalid Parameters" Exception. What is wrong?
await pinSharpClient.Pins.CreatePinAsync()
Here are the values I'm passing to it...
BoardID = "469289292360076140"
Image = "https://www.selfdefensegearco.com//Images/CuttingEdgeProducts/large_1592_SWM2BKspark_P.jpg"
Description = "Just recently females have actually been motivated to stand and speak up versus unwanted sexual advances and abuse. The #MeToo motion - which initially started in 2006 - has actually contributed in leading the charge in this location. Given that 1990 - nevertheless - Streetwise Security Products has actually likewise been leading the charge by manu ... #selfdefenseforwomen #selfdefenseweaponsforwomen #selfdefensetoolsforwomen #bestselfdefenseforwomen #selfdefenseitemsforwomen #selfdefensetechniquesforwomen #bestgunforwomensselfdefense #selfdefenseequipmentforwomen #selfdefensestepsforwomen #selfdefensegunsforwomen #selfdefensetacticsforwomen #basicselfdefenseforwomen #bestselfdefensepistolforwomen #selfdefenseforwomenmagazine #selfdefenseforwomenrunners"
Pin Link: "https://www.selfdefensegearco.com/StreetwiseMeToo23MillionVoltStunGun.htm"
I wanted to add support for the Rate Limiting information to be returned.
It seems I might need to have VS extensions installed to work on the project, can you let me know what they are so I can do a PR?
Thanks
My issue does not directly concern a method of this project.
This is my code for download my board that contains 3000 pins:
var pins = await client.Boards.GetPinsAsync(boardName);
using (var wc = new WebClient())
{
do
{
foreach (var pin in pins)
{
var fileName = new Uri(pin.Images.Original.Url).Segments.Last();
var extension = new FileInfo(fileName).Extension;
var tempFile = Path.Combine(dir.FullName, pin.Id + extension + ".tmp");
var destination = Path.Combine(dir.FullName, pin.Id + extension);
if (File.Exists(tempFile))
File.Delete(tempFile);
if (!File.Exists(destination))
{
wc.DownloadFile(pin.Images.Original.Url, tempFile);
File.Move(tempFile, destination);
}
}
pins = await client.Boards.GetPinsAsync(boardName, pins.NextPageCursor);
} while (pins.Any());
}
Work fine until: wc.DownloadFile(pin.Images.Original.Url, tempFile) throw 403 Exception in loop.
Any ideas why pinterest want to block it ? Why only ~1100 pins maximum ?
Hello there
Does PinSharp open pinterest api v5?
Hello, me program using your nuget package "not work" for me show in debug "Unauthorized".
using PinSharp;
using PinSharp.Api;
private async void Button_X(object sender, RoutedEventArgs e)
{
// Create a client with your access token
var client = new PinSharpClient("SECRET_APP");
// Create new pin
var newPin = await client.Pins.CreatePinAsync("glopesdasilvasa/testes", "https://i.imgur.com/Q9rcBQo.jpg", "Looks so cool!");
}
I try to create a application to publish in 3 social networks simultaneously, I started with pinterest using the your code.
In app manager on Developers.pinterest.com "App Secret" I copy and past in debuting token and shows not valid. The what this? Interfer to show error "Unathorized"?
Sorry my english is poor
CreatePinAsync fails most of the times with an error message: "Unexpected character encountered while parsing value: \u001f. Path '', line 0, position 0."
However the post is published.
I could not managed to find a clearly way how to reproduce it. A specific request just simply fails in one time but in the next try works again.
I was debugging it and seems that the response has a wrong encoding.
Hi Soren,
I have been working with your wonderful library for some time now and just discovered these 2 function don't work. I have the latest version installed. Runtime Version: v4.0.30319 - Version: 2.2.6.0
string boardid = "667588413453034663";
// Get board information
var myboard = await client.Boards.GetBoardAsync(boardid);
{"Invalid parameters."}
await client.Pins.CreatePinAsync(boardid, "https://mysite.com/wp-content/uploads/images/articles/keto_recipes/wholesomeyum_fathead-pizza-crust-low-carb-keto-gluten-free-nut-free-1.jpg", "This Keto White Hen Chili is an impressive home cooking recipe for the changing seasons. Itβs loading, delicious and also can conveniently be a crockpot/freezer dish! #keto #ketorecipe", "https://mysite.com/keto-white-chicken-chili-hey-keto-mom/");
{"Invalid parameters."}
Can you please see what is wrong?
Thanks, Glenn
Hii
I found there is a no feature for Like Pin.
thanks!
Wrapper works very well. But by updating a Pin I get the following error: System.ObjectDisposedException occurred. Image of code and exception
But can't figure out why this gives issues.
Hello @Krusen
I am reaching out to you to get some better details on Pinterest API. I am looking for an API from Pinterest which gives me the list of users against a specific search criteria and list of boards against specific search criteria. Do you know if such APIs exist? I am trying hard to get accurate answer here. Please note that, my application cannot generate token for each users. So I will be generating the token once with required scopes and interested in getting list of valid users and boards (public boards from other users).
I am also observing that the stackoverflow community talks about V2 and V3 APIs from pinterest, but i am not seeing any details. Is it like pinterest will be launching new API version in near future? Please let me know if you have any insight on this.
Thanks
Nilesh
Please suggest how can we use it with Winform /wpf client . What will be code value in this case for PinSharpAuthClient.GetAccessTokenAsync
Very nice, but I can't seem to get the pins of other users by username or user id, i.e. Would be very helpful.
I'm calling var newPin = await client.Pins.CreatePinAsync() and the response says that the board is not found, yet I was able to iterate through the boards and the one listed in my list is the exact name I used to pin an image.
Do I have to prefix the board name with something?
Thanks, Glenn
Is it possible to create a new pin from a local file?
In the examples the only option is using an URL.
Can I sign in by mail and password?Can I sign in by mail and password?
Models
Board
/IBoard
Pin
/IPin
User
/IUser
RateLimits
/IRateLimits
Counts
/IBoardCounts
/IPinCounts
/IUserCounts
ImageInfo
/IBoardImageList
/IPinImageList
/IUserImageList
Exceptions
PinSharpException
PinSharpAuthorizationException
PinSharpBadRequestException
PinSharpForbiddenException
PinSharpNotFoundException
PinSharpRateLimitExceededException
PinSharpServerErrorException
PinSharpTimeoutException
API
PinSharpClient
PinSharpAuthClient
IBoardsApi
IMeApi
IPinsApi
IUsersApi
PagedResponse<T>
IHttpClient
Other
InterfaceConverter<T>
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.