1

I'm trying to access project card from github api with PyGithub but I'm unable to find how to call the projectcard method (https://developer.github.com/v3/projects/cards/) It seems to be ready to use (https://pygithub.readthedocs.io/en/latest/github_objects/ProjectCard.html) My code working for projects :

from github import Github

# github access token
g = Github("XXXXX")

repo = g.get_repo("Myrepo")
projects = repo.get_projects(state='open')
for project in projects:
    print('do something with project')

thanks a lot in advance

JFMarquis
  • 127
  • 1
  • 1
  • 4
  • what do you get ? Empty screen or error message? Always put full error message (starting at word "Traceback") in question (not comment) as text (not screenshot). There are other useful information. – furas Sep 12 '20 at 05:46
  • you can use `dir()` to check functions avaliable in object - `print( dir(project) )` - maybe there is function for card. I don't have projects to test it. – furas Sep 12 '20 at 07:17
  • [Project](https://pygithub.readthedocs.io/en/latest/github_objects/Project.html) has `get_columns()` and [ProjectColumn](https://pygithub.readthedocs.io/en/latest/github_objects/ProjectColumn.html) has `get_cards()`. Maybe this is method which you need. – furas Sep 12 '20 at 07:21

1 Answers1

0

Thanks a lot for your help get_cards on columns solve the problem.

JFMarquis
  • 127
  • 1
  • 1
  • 4