light faq cleanup, more needed

This commit is contained in:
Jeremy Kauffman 2017-03-22 19:52:01 -04:00
parent 9b52ad0adf
commit e943623717
14 changed files with 48 additions and 64 deletions

View file

@ -3,16 +3,26 @@ title: How do I see the list of API functions I can call, and how do I call them
category: developer category: developer
--- ---
## The LBRY API
The best way to learn how to use the LBRY API is to go through our [quickstart](https://lbry.io/quickstart).
A full list of API calls provided by LBRY is available in [the API documentation](https://lbry.io/api).
If you're new to LBRY, this is probably the API you want.
## The LBRY Blockchain API (lbrycrd)
Ensure that `lbrycrd` is running with the `-server` flag, which enables the JSON-RPC API. Then use one of the following methods to make API calls. Ensure that `lbrycrd` is running with the `-server` flag, which enables the JSON-RPC API. Then use one of the following methods to make API calls.
Many (though not all) of the calls are the same as those for bitcoin core, which are Many (though not all) of the calls are the same as those for bitcoin core, which are
documented [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). To see the full list of API calls, use the `help` API call. documented [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). To see the full list of API calls, use the `help` API call.
## lbrycrd-cli ### lbrycrd-cli
lbrycrd-cli help lbrycrd-cli help
## curl ### curl
curl --user USER:PASSWORD --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/ curl --user USER:PASSWORD --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
@ -22,24 +32,3 @@ documented [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_l
- If the command accepts parameters, they can be passed inside the `params` array. - If the command accepts parameters, they can be passed inside the `params` array.
See Also: [important directories](https://lbry.io/faq/lbry-directories). See Also: [important directories](https://lbry.io/faq/lbry-directories).
## Python
Here is an example script to get the documentation for the various API calls.
To use any of the functions displayed, just provide any specified arguments in a dictionary.
import sys
from jsonrpc.proxy import JSONRPCProxy
try:
from lbrynet.conf import API_CONNECTION_STRING
except:
print "You don't have lbrynet installed!"
sys.exit(0)
api = JSONRPCProxy.from_url(API_CONNECTION_STRING)
if not api.is_running():
print api.daemon_status()
else:
for func in api.help():
print "%s:\n%s" % (func, api.help({'function': func}))

View file

@ -1,6 +1,7 @@
--- ---
title: How does LBRY benefit content consumers? Why should I bother caring? title: How does LBRY benefit content consumers? Why should I bother caring?
category: LBRY 101 category: LBRY 101
order: 2
--- ---
Do you watch YouTube? Imagine paying a few cents to eliminate all ads. 100% of the payment will go directly to the content creator and theyll still be earning more than YouTube offers, so theyll want to make even more of the content you love. Do you watch YouTube? Imagine paying a few cents to eliminate all ads. 100% of the payment will go directly to the content creator and theyll still be earning more than YouTube offers, so theyll want to make even more of the content you love.

View file

@ -1,14 +0,0 @@
---
title: How do I specify a web-UI to use?
category: developer
---
If the files for the UI you'd like to use are stored locally on your computer, start LBRY with the `--ui` flag:
lbrynet-daemon --ui=/full/path/to/ui/files/root/folder
Once set with the UI flag, the given UI will be cached by LBRY and used as the default going forward. Also, LBRY will only successfully load a UI if the UI contains a conforming requirements.txt file to specify the required versions of lbrynet and lbryum. [Here](https://github.com/lbryio/lbry-web-ui/blob/master/dist/requirements.txt) is an example requirements.txt file.
To reset your UI to pull from lbryio, or to try a UI still in development, run LBRY with the `--branch` flag:
lbrynet-daemon --branch=master

View file

@ -1,6 +1,6 @@
--- ---
title: What is LBRYs development status right now? Plans for the future? title: What is LBRYs development status right now? Plans for the future?
category: LBRY 101 category: developer
--- ---
LBRY is currently in invite-only beta, with desktop apps for Linux, MacOS, and a pre-release version of Windows. There are approximately 5K active users and hundreds of content creators. The network already hosts big name content like the [feature film *Its A Disaster*](https://lbry.io/news/launch-a-disaster) and videos from [Adult Swims MillionDollarExtreme](https://lbry.io/news/mde-on-lbry). We announce new featured content every Thursday on our [blog](https://lbry.io/news), [Twitter](https://twitter.com/lbryio), and [Facebook](https://www.facebook.com/lbryio). LBRY is currently in invite-only beta, with desktop apps for Linux, MacOS, and a pre-release version of Windows. There are approximately 5K active users and hundreds of content creators. The network already hosts big name content like the [feature film *Its A Disaster*](https://lbry.io/news/launch-a-disaster) and videos from [Adult Swims MillionDollarExtreme](https://lbry.io/news/mde-on-lbry). We announce new featured content every Thursday on our [blog](https://lbry.io/news), [Twitter](https://twitter.com/lbryio), and [Facebook](https://www.facebook.com/lbryio).

View file

@ -1,6 +1,6 @@
--- ---
title: Is LBRY Open Source? title: Is LBRY open source?
category: other category: developer
--- ---
All of the code we have written for LBRY is open source - even this very website! You can access it on [GitHub](https://github.com/lbryio/). All of the code we have written for LBRY is open source and MIT licensed - even this very website! You can access it on [GitHub](https://github.com/lbryio/).

View file

@ -1,6 +1,7 @@
--- ---
title: Whats with the name LBRY? title: Whats with the name LBRY?
category: LBRY 101 category: LBRY 101
order: 4
--- ---
The very first question of newcomers is often, “How do you pronounce it?” Answer: library. The very first question of newcomers is often, “How do you pronounce it?” Answer: library.

View file

@ -1,6 +1,6 @@
--- ---
title: How does the company behind LBRY make money? title: How does the company behind LBRY make money?
category: LBRY 101 category: other
--- ---
The LBRY protocol has a built-in digital currency that allows it to function, called LBRY credits. These credits are very similar to bitcoins. Having a built-in digital currency creates an opportunity for a new kind of business that has never existed: [the protocol-first enterprise](https://medium.com/the-coinbase-blog/app-coins-and-the-dawn-of-the-decentralized-business-model-8b8c951e734f#.6mr8znoiu). LBRY Inc. has reserved 10% of all LBRY credits to fund continued development and provide profit for the founders. Since credits only gain value as the use of the protocol grows, the company has an incentive to continue developing this open-source project. And we can do it all without taking a percentage of anyones transactions. The LBRY protocol has a built-in digital currency that allows it to function, called LBRY credits. These credits are very similar to bitcoins. Having a built-in digital currency creates an opportunity for a new kind of business that has never existed: [the protocol-first enterprise](https://medium.com/the-coinbase-blog/app-coins-and-the-dawn-of-the-decentralized-business-model-8b8c951e734f#.6mr8znoiu). LBRY Inc. has reserved 10% of all LBRY credits to fund continued development and provide profit for the founders. Since credits only gain value as the use of the protocol grows, the company has an incentive to continue developing this open-source project. And we can do it all without taking a percentage of anyones transactions.

View file

@ -1,6 +1,6 @@
--- ---
title: How does LBRY benefit content creators? Can I make money using LBRY? title: How does LBRY benefit content creators? Can I make money using LBRY?
category: LBRY 101 category: other
--- ---
In our AMA title, we pitched LBRY as a “community-driven” YouTube alternative that could “save the internet.” Thats a lot of big talk, but what does it mean for the people who care most about the changes happening at YouTube content creators? In our AMA title, we pitched LBRY as a “community-driven” YouTube alternative that could “save the internet.” Thats a lot of big talk, but what does it mean for the people who care most about the changes happening at YouTube content creators?

View file

@ -1,6 +1,7 @@
--- ---
title: How does LBRY naming work? Why dont you just assign names the same way as internet domains? title: How does LBRY naming work? Why dont you just assign names the same way as internet domains?
category: LBRY 101 category: LBRY 101
order: 5
--- ---
First, since there have been a lot of misconceptions about how LBRY URLs work, **it is absolutely possible to own and control a URL forever**. That is the tl;dr of this post if you don't want to read a bunch of words about how LBRY URLs work. First, since there have been a lot of misconceptions about how LBRY URLs work, **it is absolutely possible to own and control a URL forever**. That is the tl;dr of this post if you don't want to read a bunch of words about how LBRY URLs work.

View file

@ -1,20 +1,21 @@
--- ---
title: What is LBRY exactly is it a protocol, an app, a website, a company? title: What is LBRY exactly is it a protocol, an app, a website, a company?
category: LBRY 101 category: LBRY 101
order: 1
--- ---
LBRY is many components working together. For most users, it will just be a place where they can find great videos, music, ebooks, and more. A vast digital library available on all of your devices. LBRY is many components working together. For most users, it will just be a place where they can find great videos, music, ebooks, and more. A vast digital library available on all of your devices.
But behind that experience is an ecosystem that can be hard to understand at first especially because we tend to refer to all the pieces and the system-as-a-whole as “LBRY”. (Were working on clearing that up.) But behind that experience is an ecosystem that can be hard to understand at first especially because we tend to refer to all the pieces and the system-as-a-whole as “LBRY”. (Were working on clearing that up.)
It might be easier to start with what LBRY is not: it is not just another corporate media service like YouTube or iTunes or Spotify. It is first and foremost a new *protocol* that allows artists to upload their content to a network of hosts (like BitTorrent) and set a price per stream or download (like iTunes) or give it away for free (like YouTube without ads). What makes this all possible is the blockchain technology developed by the founder of Bitcoin. Do you have to understand any of this to use and enjoy LBRY? No. Does it still matter to users? Yes! It might be easier to start with what LBRY is not: it is not just another corporate media service like YouTube or iTunes or Spotify. It is first and foremost a new *protocol* that allows artists to upload their content to a network of hosts (like BitTorrent) and set a price per stream or download (like iTunes) or give it away for free (like YouTube without ads). What makes this all possible is the blockchain technology developed by the founder of Bitcoin. Do you have to understand any of this to use and enjoy LBRY? No. Does it still matter to users? Yes!
Gmail has built an extremely popular email service on top of the near-universal *SMTP protocol* that everyone uses to exchange emails. Anyone sending email with SMTP can communicate with Gmail addresses, no matter what email platform they use (Yahoo!, AOL, iCloud, etc.). Google cant interfere with someone emailing from an @yahoo.com address to an @aol.com address and users are free to switch between services at any time, taking their emails with them. Users have a lot of power in open protocols that is often taken for granted. Gmail has built an extremely popular email service on top of the near-universal *SMTP protocol* that everyone uses to exchange emails. Anyone sending email with SMTP can communicate with Gmail addresses, no matter what email platform they use (Yahoo!, AOL, iCloud, etc.). Google cant interfere with someone emailing from an @yahoo.com address to an @aol.com address and users are free to switch between services at any time, taking their emails with them. Users have a lot of power in open protocols that is often taken for granted.
Compare this to a proprietary, centrally controlled service like Facebook Messenger. If you conduct all of your social communications via Messenger, youre stuck in that environment you cannot move your messages or contacts over to Google Chat or Skype. And if Facebook changes the way Messenger functions by censoring conversations or sharing your information with advertisers or governments, tough luck. Compare this to a proprietary, centrally controlled service like Facebook Messenger. If you conduct all of your social communications via Messenger, youre stuck in that environment you cannot move your messages or contacts over to Google Chat or Skype. And if Facebook changes the way Messenger functions by censoring conversations or sharing your information with advertisers or governments, tough luck.
Even platforms that are ostensibly designed with the users control and privacy in mind are susceptible to corruption if they are centrally controlled. WhatsApp comes to mind. WhatsApp built a huge global user base claiming to put users above advertisers. Then Facebook bought it. Now users may well have their personal phone numbers and metadata mined for Facebooks advertising algorithms. Even platforms that are ostensibly designed with the users control and privacy in mind are susceptible to corruption if they are centrally controlled. WhatsApp comes to mind. WhatsApp built a huge global user base claiming to put users above advertisers. Then Facebook bought it. Now users may well have their personal phone numbers and metadata mined for Facebooks advertising algorithms.
There is no such risk of top-down corruption with the LBRY protocol. Content uploaded to the decentralized LBRY network remains publicly accessible so long as the community finds it valuable and continues to host it. There is no such risk of top-down corruption with the LBRY protocol. Content uploaded to the decentralized LBRY network remains publicly accessible so long as the community finds it valuable and continues to host it.
Now, the LBRY project is more than just a revolutionary new protocol. It is also a company, *LBRY Inc.*, which is developing a *LBRY app* to allow users to easily interact with the protocol. So its as if Google had developed the email protocol, released it to the world for free, and then built Gmail to help people make use of it. Not only is our app completely open-source, but others are welcome to create competing apps that also use the LBRY protocol. For a content creator, your uploaded content will be available to all of these apps at the same time. Now, the LBRY project is more than just a revolutionary new protocol. It is also a company, *LBRY Inc.*, which is developing a *LBRY app* to allow users to easily interact with the protocol. So its as if Google had developed the email protocol, released it to the world for free, and then built Gmail to help people make use of it. Not only is our app completely open-source, but others are welcome to create competing apps that also use the LBRY protocol. For a content creator, your uploaded content will be available to all of these apps at the same time.

View file

@ -1,13 +0,0 @@
---
title: Why should I care about LBRY if I cant even use it yet?
category: LBRY 101
---
A lot of people wont care about LBRY until it can deliver them immediate benefits. Thats fair and we understand.
The advantage of getting involved right now is the same as following a local band that youd like to see make it big. You have the opportunity to have very direct contact with our dev team. You can make suggestions and shape the course of LBRY. You can [earn bounties](https://lbry.io/bounty) for helping to build and promote LBRY. You can connect with our truly amazing community of people, like [Javier from Venezuela who says LBRY gave him new hope for life](https://lbry.io/news/day-in-shoes-venezuelan). You can [post your content to the network](https://lbry.io/publish) before it is mainstream and get attention and appreciation from our early adopters not to mention a possible prize of $1000 in LBC.
Or get involved because its rare to get an opportunity to be part of a project that could reshape the fabric of the internet and creative media for years to come.
*Did this FAQ address your concerns? Still think were full of it? Sound off at [reddit.com/r/lbry/](https://www.reddit.com/r/lbry/). Thank you for taking the time to learn about LBRY!*
**Not on LBRY yet?** [Get an invite here](https://lbry.io/get). Just cant wait? If youre a creator, skip our waiting list line for a chance to earn $1,000 in LBRY Credits at the same time. [Learn more here](https://lbry.io/publish).

View file

@ -118,6 +118,7 @@ class Controller
'/why' => '/learn', '/why' => '/learn',
'/feedback' => '/learn', '/feedback' => '/learn',
'/faq/when-referral-payouts' => '/faq/referrals', '/faq/when-referral-payouts' => '/faq/referrals',
'/faq/why-care-about-lbry' => '/get',
'/news/meet-the-lbry-founders' => '/team', '/news/meet-the-lbry-founders' => '/team',
'/faq/no-auction-options' => '/faq/naming', '/faq/no-auction-options' => '/faq/naming',
'/join-list' => '/list/subscribe', '/join-list' => '/list/subscribe',

View file

@ -79,12 +79,12 @@ class ContentActions extends Actions
if (!$slug) if (!$slug)
{ {
$allPosts = Post::find(static::VIEW_FOLDER_FAQ); $allPosts = Post::find(static::VIEW_FOLDER_FAQ, Post::SORT_ORD_ASC);
$allCategories = [ $allCategories = [
'LBRY 101' => 'Intro to LBRY',
'getstarted' => 'Getting Started', 'getstarted' => 'Getting Started',
'setup' => 'Installing and Running LBRY', 'setup' => 'Installing and Running LBRY',
'LBRY 101' => 'LBRY 101',
'wallet' => 'The LBRY Wallet', 'wallet' => 'The LBRY Wallet',
'mining' => 'Mining LBC', 'mining' => 'Mining LBC',
'policy' => 'Policies', 'policy' => 'Policies',
@ -120,7 +120,7 @@ class ContentActions extends Actions
} }
catch (PostNotFoundException $e) catch (PostNotFoundException $e)
{ {
return NavActions::execute404(); return Controller::redirect('/' . static::SLUG_FAQ);
} }
return ['content/faq-post', ['post' => $post]]; return ['content/faq-post', ['post' => $post]];
} }

View file

@ -6,7 +6,8 @@ class PostMalformedException extends Exception {}
class Post class Post
{ {
const SORT_DATE_DESC = 'sort_date_desc'; const SORT_DATE_DESC = 'sort_date_desc',
SORT_ORD_ASC = 'sort_ord_asc';
protected static $slugMap = []; protected static $slugMap = [];
protected $slug, $title, $metadata, $author, $date, $markdown, $contentText, $contentHtml, $cover, $postType, $category; protected $slug, $title, $metadata, $author, $date, $markdown, $contentText, $contentHtml, $cover, $postType, $category;
@ -80,6 +81,22 @@ class Post
return strcasecmp($b->getDate()->format('Y-m-d'), $a->getDate()->format('Y-m-d')); return strcasecmp($b->getDate()->format('Y-m-d'), $a->getDate()->format('Y-m-d'));
}); });
break; break;
case static::SORT_ORD_ASC:
usort($posts, function(Post $a, Post $b) {
$aMeta = $a->getMetadata();
$bMeta = $b->getMetadata();
if (!isset($aMeta['order']) && !isset($bMeta['order']))
{
return $a->getTitle() < $b->getTitle() ? -1 : 1;
}
if (isset($aMeta['order']) && isset($bMeta['order']))
{
return $aMeta['order'] < $bMeta['order'] ? -1 : 1;
}
return isset($aMeta['order']) ? -1 : 1;
});
break;
} }
} }
return $posts; return $posts;