Post
Topic
Board Project Development
Re: [project] api.loyce.club: crowdsourcing Bitcointalk data
by
Initscri
on 26/06/2019, 05:09:39 UTC
Have you install or/and configure MySQL? It's definitely required to build API services.

If we need simplicity, we could do it with only a table (which shown below).

Code:
CREATE TABLE MERIT (
    ID INT(11) PRIMARY KEY NOT NULL,
    QTY INT(2) NOT NULL,
    MSG VARCHAR(25) NOT NULL,
    SENDER INT(8) NOT NULL,
    RECEIVER INT(8) NOT NULL
);

Short demo (with MariaDB, but should be fully compatible with MySQL) :

Code:
MariaDB [test]> CREATE TABLE MERIT (
    ->     ID INT(11) PRIMARY KEY NOT NULL,
    ->     QTY INT(2) NOT NULL,
    ->     MSG VARCHAR(25) NOT NULL,
    ->     SENDER INT(8) NOT NULL,
    ->     RECEIVER INT(8) NOT NULL
    -> );
Query OK, 0 rows affected (0.029 sec)

MariaDB [test]> DESC MERIT;
+----------+-------------+------+-----+---------+-------+
| Field    | Type        | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| ID       | int(11)     | NO   | PRI | NULL    |       |
| QTY      | int(2)      | NO   |     | NULL    |       |
| MSG      | varchar(25) | NO   |     | NULL    |       |
| SENDER   | int(8)      | NO   |     | NULL    |       |
| RECEIVER | int(8)      | NO   |     | NULL    |       |
+----------+-------------+------+-----+---------+-------+
5 rows in set (0.001 sec)

MariaDB [test]> SELECT * FROM MERIT;
Empty set (0.000 sec)

MariaDB [test]> INSERT INTO MERIT VALUES (1561085310, 2, "178336.msg51543068", 452769, 239406);
Query OK, 1 row affected (0.008 sec)

MariaDB [test]> SELECT * FROM MERIT;
+------------+-----+--------------------+--------+----------+
| ID         | QTY | MSG                | SENDER | RECEIVER |
+------------+-----+--------------------+--------+----------+
| 1561085310 |   2 | 178336.msg51543068 | 452769 |   239406 |
+------------+-----+--------------------+--------+----------+
1 row in set (0.000 sec)

P.S. I learn SQL a bit, but i've no idea about MySQL security or performance.

It's not required to build the API service + the script CryptoNeed built simply just runs off the system Loyce has already built.

Quote
I think he is putting all the data together file by hand.

I'm assuming he uses a script to build it.