aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/mutual_friends.md
blob: 39ee76fa208ababca291e7008190b6f9e6dbf06a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
mutual_friends.py
=================

Learn who your ex and her new boyfriend are both friends with.

Usage
-----

Run from the top-level directory using `python -m`:

    > python -m bin.mutual_friends -h
    usage: mutual_friends.py [-h] [-f {csv,json}] [-o PATH] UID [UID ...]
    ...

For example (using made up user IDs/"screen names"),

    > python -m bin.mutual_friends john.doe jane.doe
    89497105,John,Smith
    3698577,Jane,Smith

In the example above, both "John Doe" and "Jane Doe" are friends with "John
Smith" and "Jane Smith", whose user IDs are 89497105 and 3698577 respectively.

The output format is CSV (comma-separated values) by default.
You can also get a JSON document:

    > python -m bin.mutual_friends --format json john.doe jane.doe
    [
       {
          "uid": 89497105,
          "first_name": "John",
          "last_name": "Smith"
       },
       {
          "uid": 3698577,
          "first_name": "Jane",
          "last_name": "Smith"
       }
    ]

See also
--------

* [License]

[License]: ../README.md#license