Skip to content

Commit 37b2cda

Browse files
committed
Update readme file
1 parent 174217e commit 37b2cda

File tree

1 file changed

+5
-198
lines changed

1 file changed

+5
-198
lines changed

Diff for: README.md

+5-198
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ ActivityPhp
55
[![Maintainability](https://api.codeclimate.com/v1/badges/72317e4f93b477359432/maintainability)](https://codeclimate.com/github/rtio/activitypub-core/maintainability)
66
[![Test Coverage](https://api.codeclimate.com/v1/badges/72317e4f93b477359432/test_coverage)](https://codeclimate.com/github/rtio/activitypub-core/test_coverage)
77

8-
ActivityPhp is an implementation of ActivityPub layers in PHP.
8+
This repository is a fork from https://github.com/landrok/activitypub.
9+
10+
ActivityPhp core is an implementation of the ActivityPub data layers in PHP.
911

1012
It provides two layers:
1113

@@ -19,7 +21,7 @@ As the two layers are implemented, it aims to be an ActivityPub conformant Feder
1921
All normalized types are implemented too. If you need to create a new
2022
one, just extend existing types.
2123

22-
[See the full documentation](https://landrok.github.io/activitypub) or
24+
[See the full documentation](https://rtio.github.io/activitypub-core) or
2325
an overview below.
2426

2527
Table of contents
@@ -42,16 +44,6 @@ Table of contents
4244
- [Use your own extended types](#use-your-own-extended-types)
4345
- [Create your own property validator](#create-your-own-property-validator)
4446
- [Dialects management](https://landrok.github.io/activitypub/activitypub-dialects-management.html)
45-
- [Server](#server)
46-
- [Server configuration](https://landrok.github.io/activitypub/activitypub-server-usage.html)
47-
- [Verify HTTP signatures](https://landrok.github.io/activitypub/activitypub-server-verify-http-signatures.html)
48-
- [WebFinger](#webfinger)
49-
- [WebFinger::toArray()](#webfingertoarray)
50-
- [WebFinger::getSubject()](#webfingergetsubject)
51-
- [WebFinger::getProfileId()](#webfingergetprofileid)
52-
- [WebFinger::getHandle()](#webfingergethandle)
53-
- [WebFinger::getAliases()](#webfingergetaliases)
54-
- [WebFinger::getLinks()](#webfingergetlinks)
5547

5648
________________________________________________________________________
5749

@@ -501,196 +493,11 @@ Type::addValidator('myProperty', MyPropertyValidator::class);
501493
```
502494
________________________________________________________________________
503495

504-
505-
Server
506-
------
507-
508-
A server instance is an entry point of a federation.
509-
510-
Its purpose is to receive, send and forward activities appropriately.
511-
512-
A minimal approach is:
513-
514-
```php
515-
use ActivityPhp\Server;
516-
517-
$server = new Server();
518-
```
519-
520-
For more configuration parameters, [See the full documentation](https://landrok.github.io/activitypub)
521-
522-
### WebFinger
523-
524-
WebFinger is a protocol that allows for discovery of information about
525-
people.
526-
527-
Given a handle, ActivityPub instances can discover profiles using this
528-
protocol.
529-
530-
```php
531-
use ActivityPhp\Server;
532-
533-
$server = new Server();
534-
535-
$handle = '[email protected]';
536-
537-
// Get a WebFinger instance
538-
$webfinger = $server->actor($handle)->webfinger();
539-
```
540-
541-
In this implementation, we can use an Object Identifier (URI) instead of
542-
a WebFinger handle.
543-
544-
545-
```php
546-
use ActivityPhp\Server;
547-
548-
$server = new Server();
549-
550-
$handle = 'https://example.org/users/bob';
551-
552-
// Get a WebFinger instance
553-
$webfinger = $server->actor($handle)->webfinger();
554-
```
555-
________________________________________________________________________
556-
557-
### WebFinger::toArray()
558-
559-
Get all WebFinger data as an array.
560-
561-
```php
562-
use ActivityPhp\Server;
563-
564-
$server = new Server();
565-
566-
$handle = '[email protected]';
567-
568-
// Get a WebFinger instance
569-
$webfinger = $server->actor($handle)->webfinger();
570-
571-
// Dumps all properties
572-
print_r($webfinger->toArray());
573-
574-
// A one line call
575-
print_r(
576-
$server->actor($handle)->webfinger()->toArray()
577-
);
578-
```
579-
580-
Would output something like:
581-
582-
```
583-
Array
584-
(
585-
[subject] => acct:[email protected]
586-
[aliases] => Array
587-
(
588-
[0] => http://example.org/users/bob
589-
)
590-
[links] => Array
591-
(
592-
[0] => Array
593-
(
594-
[rel] => self
595-
[type] => application/activity+json
596-
[href] => http://example.org/users/bob
597-
)
598-
)
599-
)
600-
```
601-
________________________________________________________________________
602-
603-
### WebFinger::getSubject()
604-
605-
Get a WebFinger resource.
606-
607-
```php
608-
echo $webfinger->getSubject();
609-
610-
// Would output 'acct:[email protected]'
611-
```
612-
________________________________________________________________________
613-
614-
### WebFinger::getProfileId()
615-
616-
Get ActivityPub object identifier (URI).
617-
618-
```php
619-
echo $webfinger->getProfileId();
620-
621-
// Would output 'http://example.org/users/bob'
622-
```
623-
________________________________________________________________________
624-
625-
### WebFinger::getHandle()
626-
627-
Get a profile handle.
628-
629-
```php
630-
echo $webfinger->getHandle();
631-
632-
// Would output '[email protected]'
633-
```
634-
________________________________________________________________________
635-
636-
### WebFinger::getAliases()
637-
638-
Get all aliases entries for this profile.
639-
640-
```php
641-
print_r(
642-
$webfinger->getAliases()
643-
);
644-
```
645-
646-
Would output something like:
647-
648-
```
649-
Array
650-
(
651-
[0] => http://example.org/users/bob
652-
)
653-
```
654-
655-
________________________________________________________________________
656-
657-
### WebFinger::getLinks()
658-
659-
Get all links entries for this profile.
660-
661-
```php
662-
663-
print_r(
664-
$webfinger->getLinks()
665-
);
666-
667-
```
668-
669-
Would output something like:
670-
671-
```
672-
Array
673-
(
674-
[0] => Array
675-
(
676-
[rel] => self
677-
[type] => application/activity+json
678-
[href] => http://example.org/users/bob
679-
)
680-
)
681-
682-
```
683-
________________________________________________________________________
684-
685-
686496
More
687497
----
688498

689-
- [See the full documentation](https://landrok.github.io/activitypub/)
499+
- [See the full documentation](https://rtio.github.io/activitypub-core/)
690500

691-
- To discuss new features, make feedback or simply to share ideas, you
692-
can contact me on Mastodon at [https://cybre.space/@landrok](https://cybre.space/@landrok)
693501
- [ActivityPub](https://www.w3.org/TR/activitypub/)
694502
- [ActivityStreams 2.0](https://www.w3.org/TR/activitystreams-core/)
695503
- [JSON-LD](https://www.w3.org/TR/json-ld/)
696-
- [WebFinger](https://tools.ietf.org/html/rfc7033)

0 commit comments

Comments
 (0)