@@ -44,7 +44,7 @@ And select a particular project to work with::
4444 >>> project.key
4545 '123'
4646
47- The above is a shortcut for ``client.projects.get(123) ``.
47+ .. tip :: The above is a shortcut for ``client.projects.get(123)``.
4848
4949Project
5050-------
@@ -60,13 +60,15 @@ For example, to schedule a spider run (it returns a job object)::
6060
6161Project instance also has the following fields:
6262
63- - activity - access to project activity records
64- - collections - work with project collections (see `` Collections `` section)
65- - frontiers - using project frontier (see `` Frontiers `` section)
66- - settings - interface to project settings
67- - spiders - access to spiders collection (see `` Spiders `` section)
63+ - ** activity ** - access to :ref: ` project activity < project-activity >` records
64+ - ** collections ** - work with :ref: ` project collections < project-collections >`
65+ - ** frontiers ** - using :ref: ` project frontiers < project-frontiers >`
66+ - ** settings ** - interface to :ref: ` project settings < project-settings >`
67+ - ** spiders ** - access to :ref: ` spiders collection < project-spiders >`
6868
6969
70+ .. _project-settings :
71+
7072Settings
7173--------
7274
@@ -89,6 +91,7 @@ Or update a few project settings at once::
8991 >>> project.settings.update({'default_job_units': 1,
9092 ... 'job_runtime_limit': 20})
9193
94+ .. _project-spiders :
9295
9396Spiders
9497-------
@@ -111,6 +114,8 @@ To select a particular spider to work with::
111114 >>> spider.name
112115 spider2
113116
117+ .. _spider :
118+
114119Spider
115120------
116121
@@ -123,6 +128,8 @@ To schedule a spider run::
123128
124129Note that you don't need to specify spider name explicitly.
125130
131+ .. _jobs :
132+
126133Jobs
127134----
128135
@@ -299,6 +306,8 @@ To delete a job::
299306
300307 >>> job.delete()
301308
309+ .. _job-metadata :
310+
302311Metadata
303312^^^^^^^^
304313
@@ -324,6 +333,8 @@ Anything can be stored in metadata, here is example how to add tags::
324333
325334 >>> job.metadata.set('tags', ['obsolete'])
326335
336+ .. _job-items :
337+
327338Items
328339^^^^^
329340
@@ -332,6 +343,8 @@ To retrieve all scraped items from a job::
332343 >>> for item in job.items.iter():
333344 ... # do something with item (it's just a dict)
334345
346+ .. _job-logs :
347+
335348Logs
336349^^^^
337350
@@ -346,6 +359,8 @@ To retrieve all log entries from a job::
346359 'time': 1482233733976},
347360 }
348361
362+ .. _job-requests :
363+
349364Requests
350365^^^^^^^^
351366
@@ -364,6 +379,8 @@ To retrieve all requests from a job::
364379 'url': 'https://example.com'
365380 }]
366381
382+ .. _job-samples :
383+
367384Samples
368385^^^^^^^
369386
@@ -374,6 +391,7 @@ To retrieve all samples for a job::
374391 >>> sample
375392 [1482233732452, 0, 0, 0, 0, 0]
376393
394+ .. _project-activity :
377395
378396Activity
379397--------
@@ -401,6 +419,8 @@ Or post multiple events at once::
401419 >>> project.activity.add(events)
402420
403421
422+ .. _project-collections :
423+
404424Collections
405425-----------
406426
@@ -427,6 +447,8 @@ Usual workflow with `Collections`_ would be::
427447
428448Collections are available on project level only.
429449
450+ .. _project-frontiers :
451+
430452Frontiers
431453---------
432454
@@ -526,6 +548,8 @@ Close batch writers of all frontiers of a project::
526548
527549Frontiers are available on project level only.
528550
551+ .. _job-tags :
552+
529553Tags
530554----
531555
@@ -552,7 +576,7 @@ Exceptions
552576scrapinghub.exceptions.ScrapinghubAPIError
553577^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
554578
555- Base exception class.
579+ Base exception class for all other exceptions listed below .
556580
557581
558582scrapinghub.exceptions.BadRequest
0 commit comments