codeforIATI / iatikit

🐨 A toolkit for using IATI data
https://iatikit.readthedocs.io
MIT License
6 stars 0 forks source link

Given an activity, find the publisher #2

Open andylolz opened 5 years ago

andylolz commented 5 years ago

E.g.:

import iatikit

activity_id = 'GB-COH-07676886-3'

activity = iatikit.data().activities.find(id=activity_id, fast=True)

print('IATI publisher "{pub_name}" has an activity with IATI ID: {activity_id}'.format(
    pub_name=activity.publisher.name,
    activity_id=activity_id))

# IATI publisher "Publish What You Fund" has an activity with IATI ID: GB-COH-07676886-3
andylolz commented 5 years ago

This depends on #1, I guess.