This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify | |
import json as simplejson | |
from bson.json_util import dumps | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Welcome to Python Flask, hello coder!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify | |
import json as simplejson | |
from bson.json_util import dumps | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<Button | |
android:id="@+id/call_api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'com.google.code.gson:gson:2.8.5' | |
implementation 'com.squareup.retrofit2:converter-gson:2.3.0' | |
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1' | |
implementation 'com.squareup.okhttp3:okhttp:3.12.1' | |
implementation 'com.squareup.retrofit2:retrofit:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.retrofitsimple; | |
import android.annotation.SuppressLint; | |
import java.util.concurrent.TimeUnit; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.SSLSocketFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.retrofitsimple; | |
import retrofit2.Call; | |
import retrofit2.http.GET; | |
public interface ApiInterface { | |
@GET("todos/1") | |
Call<Response> getAllData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.retrofitsimple; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; | |
public class Response { | |
@SerializedName("userId") | |
@Expose | |
private Integer userId; | |
@SerializedName("id") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.retrofitsimple; | |
import androidx.annotation.RequiresApi; | |
import androidx.appcompat.app.AlertDialog; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.media.DeniedByServerException; | |
import android.os.Build; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, jsonify, request | |
import math, random | |
from pyfcm import FCMNotification | |
from twilio.rest import Client | |
import zerosms | |
import getpass | |
app = Flask(__name__) |
OlderNewer