Skip to content

Commit 7c957fc

Browse files
committed
Update docs
1 parent 37b2cda commit 7c957fc

9 files changed

+13
-1520
lines changed

docs/_config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ pygments: true
55
enableRobotsTXT: true
66

77
# Site name (head)
8-
name: ActivityPhp Documentation
8+
name: ActivityPhp Core Documentation
99

1010
# Site description (head)
11-
description: A PHP implementation of ActivityPub protocol based upon the ActivityStreams 2.0 data format.
11+
description: A PHP implementation of ActivityPub core types protocol based upon the ActivityStreams 2.0 data format.
1212

1313
# Github repositories and download URLs
14-
repository_url : https://github.com/landrok/activitypub
15-
doc_repository_url: https://github.com/landrok/activitypub/tree/master/docs
16-
github_author_url : https://github.com/landrok
17-
doc_baseurl : https://landrok.github.io/activitypub
18-
github_author_name: landrok
14+
repository_url : https://github.com/rtio/activitypub-core
15+
doc_repository_url: https://github.com/rtio/activitypub-core/tree/master/docs
16+
github_author_url : https://github.com/rtio
17+
doc_baseurl : https://rtio.github.io/activitypub-core
18+
github_author_name: rtio
1919

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
source_suffix = '.rst'
1616
master_doc = 'index'
1717
project = u'ActivityPhp'
18-
copyright = u'Landrok'
18+
copyright = u'rtio'
1919
version = '1'
2020
html_title = "ActivityPhp Documentation"
2121
html_short_title = "ActivityPhp"

docs/index.md

Lines changed: 5 additions & 217 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,6 @@ Basics
4343
- [Use your own extended types]({{ site.doc_baseurl }}/#use-your-own-extended-types)
4444
- [Create your own property validator]({{ site.doc_baseurl }}/#create-your-own-property-validator)
4545
- [Dialects management]({{ site.doc_baseurl }}/activitypub-dialects-management.html)
46-
- [Server](#server)
47-
- [Server instance configuration]({{ site.doc_baseurl }}/activitypub-server-usage.html)
48-
- [Verify HTTP signatures]({{ site.doc_baseurl }}/activitypub-server-verify-http-signatures.html)
49-
- [WebFinger]({{ site.doc_baseurl }}/#webfinger)
50-
- [WebFinger::toArray()]({{ site.doc_baseurl }}/#webfingertoarray)
51-
- [WebFinger::getSubject()]({{ site.doc_baseurl }}/#webfingergetsubject)
52-
- [WebFinger::getProfileId()]({{ site.doc_baseurl }}/#webfingergetprofileid)
53-
- [WebFinger::getHandle()]({{ site.doc_baseurl }}/#webfingergethandle)
54-
- [WebFinger::getAliases()]({{ site.doc_baseurl }}/#webfingergetaliases)
55-
- [WebFinger::getLinks()]({{ site.doc_baseurl }}/#webfingergetlinks)
56-
- [Examples]({{ site.doc_baseurl }}/#server-examples)
5746

5847
________________________________________________________________________
5948

@@ -68,7 +57,7 @@ Install
6857
-------
6958

7059
```sh
71-
composer require landrok/activitypub
60+
composer require rtio/activitypub-core
7261
```
7362
________________________________________________________________________
7463

@@ -77,7 +66,7 @@ Types
7766

7867
### Type factory
7968

80-
You can instanciate ActivityStreams types using their short name.
69+
You can instantiate ActivityStreams types using their short name.
8170

8271
```php
8372
use ActivityPhp\Type;
@@ -87,7 +76,7 @@ $note = Type::create('Note');
8776

8877
```
8978

90-
Instanciating a type and setting properties is possible with the second
79+
Instantiate a type and setting properties is possible with the second
9180
parameter.
9281

9382
```php
@@ -100,7 +89,7 @@ $note = Type::create('Note', [
10089
```
10190

10291
Starting from an array with a 'type' key, it's even possible to directly
103-
instanciate your type.
92+
instantiate your type.
10493

10594
```php
10695
use ActivityPhp\Type;
@@ -519,218 +508,17 @@ and how to use them thanks to
519508

520509
________________________________________________________________________
521510

522-
523-
Server
524-
------
525-
526-
A server instance is the entry point to a federation.
527-
528-
Its purpose is to receive, send and forward activities appropriately.
529-
530-
A minimalistic approach is:
531-
532-
```php
533-
use ActivityPhp\Server;
534-
535-
$server = new Server();
536-
```
537-
538-
It's sufficient to make [some public requests](#server-examples).
539-
540-
For more advanced server configurations, Have a look at [Server Manual]({{ site.doc_baseurl }}/activitypub-server-usage.html).
541-
542-
### WebFinger
543-
544-
WebFinger is a protocol that allows for discovery of information about
545-
people.
546-
547-
Given a handle, ActivityPub instances can discover profiles using this
548-
protocol.
549-
550-
```php
551-
use ActivityPhp\Server;
552-
553-
$server = new Server();
554-
555-
$handle = 'bob@example.org';
556-
557-
// Get a WebFinger instance
558-
$webfinger = $server->actor($handle)->webfinger();
559-
```
560-
561-
In this implementation, we can use an Object Identifier (URI) instead of
562-
a WebFinger handle.
563-
564-
565-
```php
566-
use ActivityPhp\Server;
567-
568-
$server = new Server();
569-
570-
$handle = 'https://example.org/users/bob';
571-
572-
// Get a WebFinger instance
573-
$webfinger = $server->actor($handle)->webfinger();
574-
```
575-
________________________________________________________________________
576-
577-
### WebFinger::toArray()
578-
579-
Get all WebFinger data as an array.
580-
581-
```php
582-
use ActivityPhp\Server;
583-
584-
$server = new Server();
585-
586-
$handle = 'bob@example.org';
587-
588-
// Get a WebFinger instance
589-
$webfinger = $server->actor($handle)->webfinger();
590-
591-
// Dumps all properties
592-
print_r($webfinger->toArray());
593-
594-
// A one line call
595-
print_r(
596-
$server->actor($handle)->webfinger()->toArray()
597-
);
598-
```
599-
600-
Would output something like:
601-
602-
```
603-
Array
604-
(
605-
[subject] => acct:bob@example.org
606-
[aliases] => Array
607-
(
608-
[0] => http://example.org/users/bob
609-
)
610-
[links] => Array
611-
(
612-
[0] => Array
613-
(
614-
[rel] => self
615-
[type] => application/activity+json
616-
[href] => http://example.org/users/bob
617-
)
618-
)
619-
)
620-
```
621-
________________________________________________________________________
622-
623-
### WebFinger::getSubject()
624-
625-
Get a WebFinger resource.
626-
627-
```php
628-
echo $webfinger->getSubject();
629-
630-
// Would output 'acct:bob@example.org'
631-
```
632-
________________________________________________________________________
633-
634-
### WebFinger::getProfileId()
635-
636-
Get ActivityPub object identifier (URI).
637-
638-
```php
639-
echo $webfinger->getProfileId();
640-
641-
// Would output 'http://example.org/users/bob'
642-
```
643-
________________________________________________________________________
644-
645-
### WebFinger::getHandle()
646-
647-
Get a profile handle.
648-
649-
```php
650-
echo $webfinger->getHandle();
651-
652-
// Would output 'bob@example.org'
653-
```
654-
________________________________________________________________________
655-
656-
### WebFinger::getAliases()
657-
658-
Get all aliases entries for this profile.
659-
660-
```php
661-
print_r(
662-
$webfinger->getAliases()
663-
);
664-
```
665-
666-
Would output something like:
667-
668-
```
669-
Array
670-
(
671-
[0] => http://example.org/users/bob
672-
)
673-
```
674-
675-
________________________________________________________________________
676-
677-
### WebFinger::getLinks()
678-
679-
Get all links entries for this profile.
680-
681-
```php
682-
683-
print_r(
684-
$webfinger->getLinks()
685-
);
686-
687-
```
688-
689-
Would output something like:
690-
691-
```
692-
Array
693-
(
694-
[0] => Array
695-
(
696-
[rel] => self
697-
[type] => application/activity+json
698-
[href] => http://example.org/users/bob
699-
)
700-
)
701-
702-
```
703-
704-
________________________________________________________________________
705-
706-
707-
Server examples
708-
---------------
709-
710-
- [Fetch Peertube Outbox activities]({{ site.doc_baseurl }}/fetch-peertube-outbox-activities.html)
711-
- [A better way to fetch Peertube Outbox activities]({{ site.doc_baseurl }}/fetch-peertube-outbox-activities-using-dialects.html)
712-
- [An even better way to fetch Peertube Outbox activities]({{ site.doc_baseurl }}/fetch-peertube-outbox-activities-using-ontologies.html)
713-
714-
________________________________________________________________________
715-
716-
717511
More
718512
----
719513

720-
- [Contribute on Github](https://github.com/landrok/activitypub)
721-
722-
- To discuss new features, make feedback or simply to share ideas, you
723-
can contact me on Mastodon at
724-
[https://cybre.space/@landrok](https://cybre.space/@landrok)
514+
- [Contribute on Github](https://github.com/rtio/activitypub-core)
725515

726516
- [ActivityPub](https://www.w3.org/TR/activitypub/)
727517

728518
- [ActivityStreams 2.0](https://www.w3.org/TR/activitystreams-core/)
729519

730520
- [JSON-LD](https://www.w3.org/TR/json-ld/)
731521

732-
- [WebFinger](https://tools.ietf.org/html/rfc7033)
733-
734522
________________________________________________________________________
735523

736524

0 commit comments

Comments
 (0)