Import url/password via settings.py file. XXX
parent
5d5dee0503
commit
9e79dd0ef3
|
@ -32,9 +32,12 @@ pip install -r requirements.txt
|
|||
|
||||
# Configure
|
||||
Configure thusly.
|
||||
Set URL for API and API password (token).
|
||||
|
||||
|
||||
```
|
||||
vim ~/.config/mastodon-api
|
||||
cp cp src/settings.py-dist src/settings.py
|
||||
$EDITOR src/settings.py
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -17,3 +17,11 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from mastodon import Mastodon
|
||||
from settings import password, url
|
||||
|
||||
mastodon = Mastodon(
|
||||
access_token=password,
|
||||
api_base_url=url
|
||||
)
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
url='https://127.0.0.1'
|
||||
password='password'
|
Loading…
Reference in New Issue