Giter Site home page Giter Site logo

pinsharp's People

Contributors

dependabot[bot] avatar fossabot avatar krusen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pinsharp's Issues

How to Catch API Rate Limit Exception using PinSharp

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.

error on fetching pin from a board

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/

Functions Not Working

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

Need API Details for reference

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

Create Board & Change Title?

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?

Invalid Parameters

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"

Add XML Documentation

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>

Getting App Approved?

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

Question: Pinning limits

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 code Works on 2019?

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

VS Plugins / Configuration

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

Create pin api is failing

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.

Board Not Found

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

403 error after 45+ GetPinsAsync

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 ?

Create pin from local file

Is it possible to create a new pin from a local file?
In the examples the only option is using an URL.

Token v5 Not Working - Always Null

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.

Authorization Failed ?

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
    }

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.