Skip to content

Commit

Permalink
Merge pull request #6 from macedigital/chore/python37-readiness
Browse files Browse the repository at this point in the history
chore: rename arguments 'async' to 'is_async'
  • Loading branch information
Pavel Kirichenko authored Aug 15, 2019
2 parents 6a7821d + a9b6443 commit 593a2e4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions facebook_business/asyncobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,9 @@ def get_custom_conversions_aio(self, fields=None, params=None, limit=1000):
def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None, has_filters=False, for_date=None):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -748,9 +748,9 @@ def get_ads_aio(self, fields=None, params=None, limit=1000):
def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None, for_date=None):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -783,9 +783,9 @@ def get_ad_creatives_aio(self, fields=None, params=None, limit=1000):
def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -894,9 +894,9 @@ def get_leads_aio(self, fields=None, params=None, limit=1000):
def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down
16 changes: 8 additions & 8 deletions facebook_business/asyncobjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None,
has_filters=False, for_date=None, needs_carousel_name=False):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -183,9 +183,9 @@ def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None,
has_filters=False, for_date=None, needs_carousel_name=False):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -220,9 +220,9 @@ def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None,
has_filters=False, for_date=None, needs_carousel_name=False):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down Expand Up @@ -342,9 +342,9 @@ def get_insights_aio(self, fields=None, params=None, limit=1000, is_async=False,
has_action=None, needs_action_device=None,
has_filters=False, for_date=None, needs_carousel_name=False):
"""
If async is False, returns EdgeIterator.
If 'is_async' is False, returns EdgeIterator.
If async is True, creates a job and job iterator for it and
If 'is_async' is True, creates a job and job iterator for it and
returns the job iterator (AsyncAioJobIterator class, subclass of EdgeIterator).
Regardless the async parameter, it puts the iterator to the queue so that
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/test/async_adaccount_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_get_insights_async(self):
], params={
'level': Insights.Level.campaign,
'date_preset': Insights.Preset.last_week,
}, async=True)
}, is_async=True)
while not job:
time.sleep(0.3)
job.remote_read()
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/test/async_insights_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_get_insights_async(self):
], params={
'level': Insights.Level.campaign,
'date_preset': Insights.Preset.last_week,
}, async=True)
}, is_async=True)
while not job:
time.sleep(0.3)
job.remote_read()
Expand Down

0 comments on commit 593a2e4

Please sign in to comment.